No no no, older ships don't go through shakedowns; the older they are the better they run. New ships go through shakedowns not old ships.
Well, I read in the Wikipedia (I don't know if what they write is right or wrong), that shakedown, or sea trial is not necessarily conducted only by new ship. Even the commissioned ship can conducted a sea trial too. Usually to confirm the impact of the modification.
Plus, in a new vessel, the sea trial usually happen before the ship was commissioned. And usually in attendance are the technical representative of the builder. But the Enterprise A has been commissioned.
So in case of the Enterprise A; there are two possibility that I think about of it.
First, They have built the hull long time ago. But hasn't commissioned the ship yet because of various reason. Then when they think it is necessary, they put the weapons, electronics, etc and commissioned her. It happen in real life too. For example the Chinese Navy. they built their Type 052C hull long time ago. But it is only recently that they put the electronics, weapons etc, and commissioned her.
Second, The Enterprise A is actually an old vessel that has been decommissioned by the Starfleet. Then when they think it is necessary to reward Kirk and his crews a ship, then they took the ship out from the mothball, refit her, and then renamed her with "USS Enterprise-A".
Because of the modification, it is logical that Kirk conducted "sea-trial" / shakedown on the "Enterprise-A".