you can change the order of the ships in the shipyard by depositing you ships in your HQ and withdrawing them in the order you want them (log out and log in to see the final result).
When ships are placed in the shipyard, be it bought from stock, received from the item menu, or withdrawn from the HQ, they hold a dock number and stay there no matter what you do to the ships around them.
for example you had a DD in spot 1, then bought a CL in spot 2.
If you sell or deposit the DD and buy a CA, the CA will appear in spot 1 and you can withdraw the DD in spot 3. (hint: you should choose careful placement of your premium and event ships since you won't be able to move them without buy a new one.)
I personally put my main ships in front, then some support ships like SS, CV, AA, then the rejects in the back like PCL. It was especially useful when server merge, I think, when they sold everyone's Prem ships. I then bought a bunch of DDs to push the prem ships to the back and sold said DDs. Now when I buy new ships they appear between the favorites and the rejects.