Why did America want Japan?

Why did America want Japan? According to the terms of the treaty, Japan would protect stranded seamen and open two ports for refueling and provisioning American ships: Shimoda and Hakodate. Japan also gave the United States the right to appoint consuls to live in these port cities, a privilege not previously granted to foreign nations.

According to the terms of the treaty, Japan would protect stranded seamen and open two ports for refueling and provisioning American ships: Shimoda and Hakodate. Japan also gave the United States the right to appoint consuls to live in these port cities, a privilege not previously granted to foreign nations.