I don't know about where you live, but where I grew up, the laws are usually applied to groups of teens roaming the streets, not sitting at a coffee shop or Denny's (although Denny's was around when I was a teen, coffee shops were not popular, and that was only a dozen years ago).
So, you won't agree that MOST teens out at that hour are MORE prone to destructive behavior (drinking, smoking, vandalizing, disturbing the peace, etc.)? You can't, as a teen, go into certain movies either. Shameless that someone would want to protect you, even if you refuse to believe you need guidance.
An example to illustrate why even if a group of teens is not being "bad" this law should still apply:
Say that you are 16, just recently got your license. You hang out at a friends house until, say 9pm, and then the four of you decide to go to Dennys to play cards (or discuss politics, or gossip, or whatever). You stay there until 2am. At 2am, you need to drive your buddies home. Now, given that teens are already more prone to accidents, given that lack of sleep impairs you ability to drive, given that its 2am when there may be more drunks on the road, I would submit that your chance of being in a car accident are increased.
This law is for the teens safety, not to punish them or to play parent for them. It is similar to why it is illegal to turn of red at certain lights. Nothing inherently bad with turning on red, but at those particular intersections, turning on red is an increased safety risk.
Teens are more prone to do stupid things than older people. They are willing to do things "on a dare" the way that older people will not.
As to the fact that a law exists will not prevent behavior...I submit the exact opposite is true. Law-abiding people (including teens) as less likely to do something that is against the law than they would be if the same act was illegal.
A quote from Abs' article..
QUOTE
But many young people don't expect the decision to change the way they spend their free time at night. Some, like Alex, say their parents will continue to enforce their own curfew rules. Others are pragmatic.
If you're out late and you don't attract police attention, they say, you won't get in trouble.
"As long as you aren't in trouble with the cops, it's cool," said Terrance Owens, a 14-year-old hanging out with friends at a Near-Northside gas station.
Some police departments didn't make curfew scofflaws a priority.
"We've got 300 police officers," said Capt. Bill Welcher of the Evansville Police Department. "They've got more to do than run around checking people's ages."
If you aren't doing something "suspicious" there is no reason that most policemen will bother you.