Anyone can buy a property in Japan if you have the cash. And it could help you with a visa application in the future, but buying property does not get you a visa in Japan.
If you tried to resell it, you might not get your money back. It is priced according to the Japanese market and how Japanese people view old buildings in the country in Japan. People just think it is cheap because they come from places where real estate is scarce and expensive.
You may find as a foreigner attaining a proper long-term visa is difficult. You can only stay in Japan 180 days maximum unless you can secure a proper visa.