I understand that European feudalism was generally due to constant invasions (correct me if I'm wrong here), but, seeing as Japan never faced such invasions, why was it so similar to it until the industrial age?
I can't comment on European feudalism, but Japanese feudalism originated from a very different structure than European feudalism. Also, Japan was a very stable society for long periods of time, aside from the Genpei and Onin wars, and the Sengoku period. I would also contest the notion that it was highly militarized, as "samurai culture" didn't really sink in until the 1700s to 1800s.
Firstly, Japan is a big country, tip to tip. The distance from Sendai domain in the Northeast of Honshu to Satsuma domain in the southwest of Kyushu is about 90% of the distance as from Berlin to Madrid. It was very difficult to administrate as a result. Therefore, the Shogun would need to appoint officials to administrate these far flung regions. These officials became known as Shugo, who later became the Shugo Daimyo.
Over time, these Shugo started deriving their power from local support and by having their family/clan members as vassal administrators. Some of them began to effectively rule the land by themselves, as opposed to as officials of the Shogun. For the most part, the Shogun wasn't able to do much about this, partly because they weren't aware of these developments, and partly because they didn't care.
Thinks came to a screeching halt during the Onin war. Two daimyo had disagreements and started attacking each other. The government didn't care to do anything to stop the fighting, essentially condoning warfare between daimyo with disputes. As a result, all the daimyo that had disagreements with each other (and there were many) went to war. The shogun's power was severely curtailed as a result.
Eventually, some of the daimyo grew strong enough to take control of the country, namely, Oda Nobunaga. He essentially made the Shogun his puppet (as the Shogun had puppeted the Emperor in the past) and continued subjugated daimyo until his assassination at Honnouji. His successors, Toyotomi Hideyoshi and Tokugawa Ieyasu, continued subjugating rogue daimyo until they all ended up swearing allegiance to Tokugawa, making him the new Shogun. He preserved the existing system for the most part, although he made his closest vassals and family members daimyo in significant amounts of territory, although there were exceptions like Choshu and Satsuma. But that came much later-when the Europeans came back in the 1800s.
Sources:
Mason, A History of Japan
why was it so similar to it until the industrial age?
ParkSungJun has provided a very nice answer up until the start of the Tokugawa Shogunate. As you've said however, it remains fairly Feudal until the Meiji Restoration and the start modernization.
The period from 1603 to about 1853 is typically called the Edo period. This 250 year span is when the Tokugawa Shogunate ruled Japan with much more success than their predecessors. The Tokugawa had the money, soldiers, and general influence to have a much firmer grip over Japan than the Kamakura or the Ashikaga Shoguns had.
However, that grip wasn't always firm, or always absolute. Many families who had opposed the Tokugawa absolutely hated being ruled by them and these domains were less likely to enforce the various edicts passed down from Edo. The Shimazu of Satsuma are a fine example of this. Their distance from Edo, dislike of the Shogunate, and military might allowed them to slide around or get exemptions from some edicts.
The Shogunate also had to rely on it's own money to rule. They didn't levy taxes on every single part of Japan; much of their money came from their own holdings. This is why the Shogunate controlled the most productive goldmines, and important ports.