The samurai have been a vital part of Japanese culture for hundreds of years. Their tales form a rich mythological tapestry that has inspired the imaginations of countless people. Even after the Meiji Restoration, when the samurai's reign over feudal Japan effectively ended, their grip on the national consciousness remained. Like the knight or the cowboy, the samurai created a culturally specific ideal that continues to find expression in Japanese society - sometimes in the least likely of places.
Samurai regarded their mortal bodies as expendable tools in combat. According to the code of the bushido, it was preferable to die with honor than live in shame; the code even endorsed rituatlistic suicide as a way for samurai to regain their standing in society. Couple their view of the body as an instrument with their often ostentatious armor - including iconic headpieces that sported golden V-fins - and you can probably begin to see where this is all going.
Mitsuteru Yokoyama was the first manga artist to pen what we'd later identify as "mecha" in his 1956 work Tetsujin 28-go. This was then animated a few years later and even made the leap across the globe as Gigantor. However, the simple beginnings of mecha belie their historical influences. The main protagonist, Shotaro Kaneda, controls the eponymous robot from the ground via remote control, but Tetsujin 28-go was very much an extension of Shotaro: The mecha was his expendable body, one practically controlled by his "will" alone. Despite being a radio-controlled robot, Tetsujin 28-go also had, for all intents and purposes, a soul.
Fast forward 20 years and you'll find the tail end of Yokoyama's influence, with Go Nagai's wondrous super robots striking poses across the Japanese airwaves. In these shows, the protagonists actually sat within their mecha and powered them with ferocious skill and determination. And it was here, in the twilight of the super robot era, that a new program mapped the samurai mythos directly onto mecha.
Mobile Suit Gundam first aired in 1979 with an almost unknown Yoshiyuki Tomino at the helm. It absolutely tanked. It wasn't until the series was re-assembled into three movies that probably the most well-known mecha franchise in existence came into being. Mobile Suit Gundam dropped the inferences to samurai culture in favor of something more overt. The Gundam mobile suit itself looked strikingly similar to brightly coloured samurai armor; the V-fin atop its head and its samurai faceguard became a consistent design motif amongst the series' many sequels. But the true core of the series was the advancement of human evolution via spiritually attuned "Newtypes" that treated their bodies as mere vessels for their souls.
It was practically the bushido code set in space.