The phrase "no hat, no salute" originates from military custom. In certain environments, like indoors, service members remove their hats and aren't required to salute superior officers.  As such, it emphasizes that if one isn't wearing a hat, there's no obligation to salute.