That is disrespectful for the sword (and as a cursed one it should have made Luffy regret it the very next moment he threw it, don't know, maybe some fodder stabbing him) and that is why Zoro went crazy as he treats the swords (at least his swords) with the same cure Luffy has for his straw hat.
About Law maybe he sees swords just like instruments for his df/surgeon skill, also he didn't threw it at the enemy but behind him in an empty space so maybe that is acceptable for a swordsman/ df user way less obsessed by swords than Zoro.