Indeed, a lot of ships were built in indian shipyards, but they were banned from european ports. Wikipedia:
"Many hundreds of Indian-built Indiamen were built for the British, along with other ships, including warships. Notable among them were Surat Castle (1791), a 1,000 ton ship with a crew of 150, Lowjee Family, of 800 tons and a crew of 125, and Shampinder (1802), of 1,300 tons.[1]"
Answering the original question: Ship building is not restricted to Home Port alone. You can build shipyards into ports you rule. Any shipyard can build ships, but the level it is on dictates what kind of ships can be built there. For example, Sloops and Cutters require only lvl 1, but 46 and 90 gun require the highest level, 4.
This is strategic decision. As shipyard can build only a single ship at a time, they might become the bottlenecks on your road to victory. Example: Frigate takes 9 months to build, so single shipyard can churn out full fleet of frigates (=5 ships) in 45 calendar months, almost 4 years.
Having two shipyards able to build frigates cuts this time down to 27 months (2 at one place in 18 months and 3 at another in 27 months). Naturally in this case you would have to get the ships into same port in order to put them into single fleet.
This fact also forces player to think ahead more than usual. If war brokes out, you are ill equipped to fight it, if it takes years before you can launch enough ships. It also makes losing large ships hurt, ah so sweetly ;-)