First of all, people that work at the airport counters are idiots. That's not an opinion, that's a fact. So when they say, "It's a law" and are unable to produce it, don't be surprised. The agent who said that doesn't know that it's a law - he just knows that it's what his supervisor tells him to do.
You have to carry your ID all the time. If you get pulled over and don't have your license, you're not treated as someone who forgot his license, you're treated as an unlicensed driver. I don't necessarily think that's how it should be...but that was in effect long before 9/11.
Private companies can do whatever the hell they want, within regulations. Go into any store and see if they've got a policy somewhere saying, "We reserve the right to refuse service to anyone for any reason." They all do. If you don't like how it works, take your business elsewhere.