Also check out 400.7(A) uses permitted for flexible cords.
I do not see anything in the uses permitted that will apply to a water heater with the possible exception of (8). Most water heaters that will be allowed to be cord connected by (8) will likely have the cord installed on them at the factory.
While true for hot water heaters, there are appliances that don't come with cords since there is more then one way to wire them such as ranges, clothes dryers and such, and many small hot water heaters up to maybe 10 gallons, will have the option of a corded connection in the listed instructions, but I have never seen this in a 40 gallon or even a 30. most likely because of the resistance type heating, most plug connections don't seem to hold up, I have seen a few that was done like this and had to remove the cord and hard wire them because the plug and receptacle was burnt up, not saying this is the reason but most likely.