Answer by Makiko Itoh, 海外組:
Well, they were basically forced to. Or rather they did not see much choice in the matter. However, there was still strong opposition to doing so, which led to a brief civil war and a total change of government.
Japan was not totally unaware of advances in Western technology, since they had ongoing contact with the Dutch even during their period of isolation. But when the black ships (what foreign vessels were called) showed up on their shores, especially U.S. Commodore Matthew Perry's fleet in 1853, to ask (or demand) that Japan open its ports to trade and restocking of ships from other countries, it was a huge shock to many people just how advanced the technology was, especially in shipbuilding and weaponry.
This is a contemporary document illustrating Perry's fleet.
The government in power, the Tokugawa shogunate, was still opposed to opening up the country. They were eventually overthrown (although a lot of bloodshed was avoided when the last shogun resigned voluntarily), and the Meiji government took over.
One factor in the decision to very rapidly Westernize the nation, in terms of technology and in things like clothing and eating habits, was to try to convince the Western powers that the Japanese were their equals. They were very much afraid of ending up like China, dominated and divided among various Western colonial powers. So they urged the citizenry to adopt Western mannerisms and even morality as quickly as possible, as a kind of civic duty.
I have answers addressing this period in Japanese history in more detail.
Incidentally, the current NHK historical drama Yae no Sakura is about this period, if you can catch it somewhere. It's pretty good.
More questions on History of Japan:
TODAY IN SLATE
Don’t Worry, Obama Isn’t Sending U.S. Troops to Fight ISIS
But the next president might.
IOS 8 Comes Out Today. Do Not Put It on Your iPhone 4S.
Why Greenland’s “Dark Snow” Should Worry You
How Much Should You Loathe NFL Commissioner Roger Goodell?
Here are the facts.
Amazon Is Launching a Serious Run at Apple and Samsung
Slim Pickings at the Network TV Bazaar
Three talented actresses in three terrible shows.