NEC Compliance: Removing a wall switch in favor of a remote for a ceiling fan
You're correct, there's a huge Code problem with that. It's stated in the Electrical Code, but mainly because it's also stated in the Building Code.  

I mean nobody cares about the fan.  Have a field day controlling that with your phone or whatever.  The core issue is that, as you might have noticed, almost every room has its light switch in an easily anticipated location; you can walk into a room you've never been in before and your hand knows where to reach to find the light switch.  Like a lot of really good UX features, that one is subtle and almost unnoticeable.  Anyway, you anticipated correctly: You're not allowed to break that. 

A core doctrine of US cities is "No hovels". You are not allowed to build a home in which practical occupancy is only possible by you.  So "Secret" methods of turning on basic things like lights are not allowed: you can't have all your house's lights controlled by your phone only.  Aside from community standards and its effect on real estate prices, the #1 reason is visitors.  And the #1 kind of visitor they're worried about is first responders.  The EMT trying to intubate you, the firemen searching rooms, and the cop needing to see that's a gaming mouse not a gun. 

Home Depot stocking something is about that thing being UL listed, and UL only makes sure the product won't kill you through inept quality or some design glitch that has proven troublesome in the past.  Home Depot sells lots of things that are legal in some ways (NEMA 10-30 recep to replace identical recep) and illegal in other uses (to replace a NEMA 14-30).   Instructions are part of what UL certifies; and UL will generally try to avoid approving instructions which definitely, always violate the electrical code, but that fan's remote with its on-the-switch hangar would not always violate; it'd be legal in cases where the fan and light are controlled separately. So the instructions/UL would not disallow it.

Depending on how your wiring is laid out, there's a fair chance you can wire the remote to control the fan remotely and leave the light to the switch.  

Depending on how cleverly the remote is designed, it could even allow fan+light to be turned OFF by the switch (or remote), but cause the light to definitely come ON when the switch is thrown ON (that is to say, after power loss, its default is to turn the light on).  That is the ideal scenario since it provides positive light-turn-on from the switch (to satisfy building codes) and positive system disconnect from the switch also (for safety).