How is that legal

How is it legal for someone to record someone else for TikTok, Facebook, etc… I keep seeing some of homeless people and frustrated mothers and like you don’t even know the story of that person and I just feel bad for them. Like how can that be legal?