I think it is illegal in at least some states. I’m pretty sure it is in the state I tested in Maryland, when I was a teenager. Or, maybe it was just advised against doing it, and not actually illegal.
It’s not safer to be barefoot. You need your feet protected so you don’t risk hurting your foot and not being able to press the pedals. In an older clutch car it’s pretty difficult to use the clutch barefoot in my opinion. Maybe in the newer Japanese and American cars the clutch is so soft it’s not a big deal.
I knew people who drove barefoot regularly when I lived in NY as a kid.
Generally speaking I’d say sturdy footwear is probably recommended. I have slide on shoes I won’t wear when I drive a clutch car. Really cheap flip flops that can fall apart or curl under your feet easily I won’t drive in either with any type of transmission. I do wear slip on shoes though in an automatic if they fit well and are sturdy.