Why was there such a difference in the numbers of boats built in each yard?
The first reason is that Electric Boat and the Portsmouth Naval Shipyard were established yards and could ramp up production more quickly. They were experienced in building submarines. The Manitowoc Shipbuilding Company had not been building Navy ships at all. They did not finalize their first contract, for just 10 boats, until October of 1940.
Mare Island Naval Shipyard was an experienced yard and had built submarines as well as ships of various types. However, it soon became apparent that the shipyard would be needed for submarine overhauls. That limited the amount of new submarine construction that could be completed there.