Generally, Japanese people think as follows:
Reason 1: The constitution of Japan states that Japan can't have an army. Therefore, Japan needs the US army for its defense. When thinking about if Japan needs the US for it's defense, it is important to look at, "The Constitution of Japan"
The Constitution of Japan, Article 9
Aspiring sincerely to an international peace based on justice and order, the Japanese people forever renounce war as a sovereign right of the nation and the threat or use of force as means of settling international disputes.
In order to accomplish the aim of the preceding paragraph, land, sea, and air forces, as well as other war potential, will never be maintained. The right of belligerency of the state will not be recognized.
According to Article 9, Japan is supposed to have renounced it's right to war. However, as stated by "Global Firepower*", Japan has the Self Defense Forces whose military power ranks 10th in the world, surpassing Israel's.
*Global Firepower (GFP) provides a unique analytical display of data concerning today's world military powers. Over 100 world military powers are considered in the ranking which allows for a broad spectrum of comparisons to be achieved concerning relative military strengths.
Global Firepower -2014 World Military Strength Rankings (nuclear capability is not taken into account)
The GFP Top 10: 1. United States 2. Russia 3. China 4. India 5. UK 6. France 7. Germany 8. Turkey 9. South Korea 10. Japan 11. Israel 12. Italy 13. Egypt
Therefore, Japan does not actually need the US for its defense.
FYI: Why is the Japanese government able to state the Self Defense Force as non-military despite its strong military power?
Ministry of defense: The Government's View on Article 9 of the Constitution
(Extract) The self-defense capability to be possessed and maintained by Japan under the Constitution is limited to the minimum necessary for self-defense.
The specific limit has a relative aspect of varying with the international situation, the level of military technology and various other conditions. It is defined in the Diet, the representatives of the people through deliberations about each fiscal year budget etc. However, whether or not the said armed strength corresponds to "war potential" prohibited under paragraph 2 of Article 9 of the Constitution is an issue regarding the total strength that Japan possesses and maintains. Accordingly, whether or not the SDF are allowed to possess some specific armaments is decided by whether the total strength will or will not exceed the constitutional limit by possessing such armaments.
But in any case in Japan, it is unconstitutional to possess what is referred to as offensive weapons that, from their performance, are to be used exclusively for total destruction of other countries, since it immediately exceeds the minimum level necessary for self-defense. For instance, the SDF is not allowed to possess ICBMs, long-range strategic bombers or offensive aircraft carriers.
Reason 2: The location of Japanese islands was, and still is important for the balance of power in Asia. Therefore America, the world's police, needs to have many military bases in Japan.
In the era of the Cold War, it was a probable theory that America needed Japan to police Asia. South Korea and Japan bordered the Soviet Union, China and North Korea, which were communist powerhouses at the time. Japan could therefore have been an important frontline country for the West.
Many Japanese people believed this theory, my father being one of them. I remember a conversation with my father in the early 80s. I was junior high school student. I told him that the US should set up more military bases in Hokkaido, the northern large island in Japan. I knew it was not far from Hokkaido to the nearest island of Soviet Union (only 42km or 26miles). My father said, "Boy, do you know the reason the US never set up a base in Hokkaido? If it does so, the Soviet Union will think it is not a deterrence but take it as a war declaration. Very sensitive topic." To me, this experience represents the fact that Japanese people were aware of the tensions between the West and the East in the Cold War era, and Japan's important role in this conflict.
At that time, many Japanese people believed the US bases were necessary on islands in Japan. Now however, many people think that the current situation with China is the same as Japan's relationship with Russia during the Cold War. Therefore, they think that Okinawa is key for Japan's defense and the balance of power in Asia. The area size of the US bases in Okinawa accounts for 73.9% of all the US bases in Japan*. The large concentration of American power in one area (Okinawa) could be seen by some as America using Japan as a barrier against Asian countries such as China.
*http://www.pref.okinawa.jp/site/chijiko/kichitai/documents/kadai.pdf (in Japanese)
My opinion differs from this viewpoint. I agree that the US bases in Japan are located in Okinawa because of the Cold War, China and North Korea. However, the Cold War is now over and the likelihood of attack from China or North Korea is much lower than during the Cold War era. I therefore do not think that American still needs US bases in Japan to keep the balance of power in Asia.
My main opinion about the reason of the existence of the US bases in Japan is different from the above reason.
The USA does not need Japan to keep the balance of power in Asia. The biggest reason for America's presence in Japan is that it costs less to locate US bases in Japan rather than in other countries. As can be seen in the graph below, Japan contributes more money to US bases and soldier salaries than any other country.
Allied Contributions to the Common Defense (United States Department of Defense 2004)
It can then be seen that Japan contributes more to US bases and soldier salaries than any other country.
Why Japan does this can be explained through events surrounding the establishment of Article 9?
The US wrote the first draft of The Constitution of Japan, including Article 9, in February 1946. At that time, the Cold War hadn't started yet. However, one month later, the Prime Minister of the UK, Churchill, first spoke of "The Iron Curtain", which is famous for signaling the beginning of the Cold War. In June 1950, the Korean War broke out. One month later, the US made Japan establish the National Police Reserve, which would later become the Self Defense Force. In short, I believe the US may have been anxious about Japan's remilitarization at first, but then used Japan as a wall against communist countries. After the Cold War ended, the US continued to take advantage of Japan simply to maintain the US bases at a low cost.
Conclusion: One more question
I believe America's military presence in Japan is not needed for Japan's defense to maintain the balance of power in Asia. It is simply because Japan provides a large amount of money for the US bases and soldier salaries. I must ask, why does Japan continue to support the US bases and provide them with a lot of money? Such policies are decided by the Liberal Democratic Party of Japan. They are conservative and many members have a nationalistic mindset, however they choose to be dependent on the US. I can't understand why. I understand only that Japan has virtually been subordinate to the US from the end of World War II.