A lot of companies use cargo ships to transport stock across the globe, as shipping by sea is often times cost-effective for many businesses.
The Wall Street Journal reports that Nintendo decided in March to ship via air to meet an exceeding demand of the Switch, which sold 2.74 million units of the console, surpassing the original 2 million units that were predicted. Nintendo has since switched back to using sea freight to move product around the world.
As to where the units were going, reports say that they shipped from China to Europe and the United States, and Nintendo ate around $45 USD each unit to get these units out via plane.