I think the implication instead is you can't carry on sunscreen since it's a liquid, so you'd have to buy when you get there. But you're right, if you're checking a bag, you can bring all the sunscreen you feel like schlepping.
I'm still having trouble finding any sort of indication that there's a law on the books that prohibits travelers from bringing whatever sunscreen they want into the state via air (or boat, I suppose). Nothing on banning possession either. Do you have a source?
Best I can find is that Hawaii prohibits the sale of sunscreens containing oxybenzone or octinoxate, which took effect in 2021.
There's no enforcement, but bringing liquids through the TSA is a moderate pain in the ass, so it makes more sense to buy sunscreen at your destination.
If you're implying this is somehow enforced at the airport, this is not even remotely true.
Source: Brought my own sunscreen from outside of Hawaii and used it all last week while visiting.