It cannot be the same "they" as came to Bethlehem for that "they" includes Naomi. The only other candidate is "the whole town" - since "they" is feminine this makes the "whole town" feminine too.
Though since "town" is feminine this may mean no more than the use of a plural rather than a singular verb by a grammar conscious scribe - the author is not so concerned by grammar.