Usually it doesn't and if there are ships already present near port city which have just been produced and present at default location you have to move them along with incoming ships to some other location to stack them together and any newly produced ships won't be stacked with them too.
I am the best player of this game that was and ever will be