I always took the view that while the Ambassador class was a good, proven ship design which pushed starship innovation further for Starfleet (first ship with phaser arrays) it was costly and time-consuming to produce compared to its older brother in the Excelsior class.
Starfleet has a lot of time and experience building the Excelsior class, and likely has the production process all but perfected and can crank them out quickly and efficiently, unlike the Ambassador.
Then at some point, Starfleet started to mess around with a new era of ship that eventually cumulates in the Nebula/Galaxy class ships. During this process, however, the design RnD come up with some smaller but useful ships that are just as effective if not more so than the Ambassador in many different roles. These ships are the New Orleans, Niagara, Springfield and Challenger class ships.
It's inevitable that Starfleet is going to shift a part of its difficult Ambassador production over to these new ships that are getting the job done with less time, manpower and resources, not the easier to produce Excelsior. As a result, the Ambassador is slowly sidelined.