In ‘Relics,’ Scotty mentions that the Enterprise-A was in mothballs. Mothballing a ship means that it is put into storage with the intention that it will be used again at some future date. Obviously if Starfleet intended to use the ship again, it would be renamed and given a new registry, since the Enterprise-B would already be in service. Since there was nothing inherently wrong with the ship (or at least nothing that couldn’t be easily repaired), it’s entirely possible that the ship was given a new life after 2293.
As for why it was decommissioned in the first place? To make way for the Enterprise-B, obviously. And on a related note, I also believe that the Enterprise-B was also eventually decommissioned to make way for the Enterprise-C, and that the B was renamed the Lakota (the ship we saw in DS9), since it was the exact same model and we never saw another Excelsior with those modifications. Plus, with the prevalence of Excelsiors still in service in both TNG and DS9, there would have been no reason to decommission the Enterprise-B unless there were extenuating circumstances (either the ship was decommissioned to make way for a new Enterprise, or it was destroyed.) I prefer not to think it was the latter, as four Enterprises being destroyed in the line of duty (Nil, B, C, and D) rubs me the wrong way.