Board Thread:General Discussion/@comment-31081236-20181026233814/@comment-91424-20181027161616

As seen in S3E9 "Save Henry", Emma offers to take the Lost Boys back to Storybrooke with her and several of them choose to come with her and the others on Hook's ship. When Regina's curse is undone, everyone is sent back to where they came from and as seen in S3E4 "Nasty Habits", several of the Lost Boys come from the Enchanted Forest. Therefore, the ones who came from the Enchanted Forest are returned to their original home world when the curse is undone and are brought back to Storybrooke when Snow White casts the second curse.

As for why some of them were still in Neverland, it's most likely because not all of the Lost Boys chose to leave with Emma. Seems like some of them preferred to stay.