There’s purchase and then there’s possession.
You can legally have (possess) a long gun (rifle, etc) under 18 in many states. You can’t buy it but someone can buy it for you.
An interesting comparison might be made to see whether there’s a difference between legally purchasing alcohol and legally drinking alcohol. I know once upon a time it was legal in many areas to *drink* under 21 but not to purchase, under some circumstances.