Agreed. Unfortunately the law and common sense don’t always align. Maybe the father could be charged with reckless endangerment or some sort of neglect - I’m only saying there probably isn’t a direct firearm storage statute that was violated here.
Edit: Sadly, it’d probably be easier to charge him for leaving the kid in the car based on how hot it was, with the gun storage issue maybe as an aggravating factor.