I don't think it's a law, they just looked at it as the right thing to do. If I were on a sinking ship it would definitely be children first, then anyone younger than me, which is probably most everyone.
I never knew men HAVE to pay for dinner. If someone invites me out to dinner, they should pay. If they ask if I'd like to join a group I figure I'm paying for my own. If I invite someone out, I pay. If a guy is paying as he figures he's buying a night in bed, I pay for my own.