It could also be that in addition to the terms of the treaty, the Cloaking Device may necessitate certain compromises in starship design that are undesirable in Federation Starships.
For example, the power and mass requirements for a cloaking device may limit the number of science labs, or scanning equipment a Federation starship would prefer to carry. Or perhaps, equipping a starship with a cloaking device means sacrificing some for the space devoted to the habitability of the crew, smaller quarters, no holodecks, etc.
I know starships seem magical at times, but even in the 24th century there are compromises that have to be made in any design even if the writers never got around to establishing any.
I've also always assumed that, in addition to the Pegasus, the Federation have had "black ops" development of cloaking technology just to keep pace with the Romulans in the event a war broke out and they needed to develop the technology quickly.