Diplomacy doesn't always mean making the logical choices. I personally don't agree with the Federation banning cloaking device use, but I understand why they did it. Frankly, condoning it would mean many vessel coming from many different species equipped with it, making it easy for rogue elements to take advantage. Cloaked vessels are extremely difficult to track.
"In universe" I could see Starfleet justifying certain ships having a cloaking device installed, like deep space exploration ships or destroyers equipped to battle the Borg. Imagine having that transphasic cloaking device when going up against a cube? The Borg wouldn't stand a chance. Otherwise, outside of combat those vessels so equipped would have the cloaking device off-line and off the power grid, so there's no chance of accidental use. It would take a few minutes to install though, for emergency purposes.