It's a store policy, common in many if not most places in the country.
Although there's no state law prohibiting someone under 18 carrying a knife, there can be--and often are--innumerable municipal ordinances prohibiting it. Rather than keep track of which store locations can or can't sell to minors, it's easier to make a blanket policy that covers *all* stores.
To Planterz' point, imagine a scenario where a chain of big box stores openly sells knives to minors (and anyone else with money). Of course, there's a store in Pascaloosa Falls... and this municipality happens to have an ordinance prohibiting minors from carrying a knife.
A high school junior walks in, buys a $25 blade, and gets busted Monday at school for carrying it. The school calls the police, the police discover where he bought it, and now there's attorneys to pay. Suddenly, that $25 blade got a whole lot more expensive to the store.
Best to get around that mess by avoiding it. Hence the policy.
This is just one example. Creative folks can easily come up with other scenarios that add up to the same conclusion.