@Baem As was noted by jimmysuzuki, it is a separate thing. Most modern "japanese" food is usually an adopted/localized form of non-native cuisine. Even Tempura arrived via the Portuguese.
For the specifics about Hambagu (which is this form of food, NOT ham-bah-gah- which is what is associated with fast food restaurants burgers), this is from https://norecipes.com/hamburg-steak-hambagu/
"If Hambagu sounds a bit like Hamburger, that’s because they both evolved from a common ancestor. The name “Hambāgu” (pronounced hahm-bah-goo) is a transliteration of the German city of Hamburg, a port, through which many Northern European emigrants passed through. In the mid 19th century the influx of Germans prompted restaurants in New York to start selling a “Hamburg-style Steak.” In the US this later branched off into Salisbury Steak, which is served with gravy, and the world-famous Hamburger, which we all know is served in a bun.
So when did Hamburg Steak come to Japan? When it came in, and who brought it in is a mystery, but one clue lies in the name used for early versions of this dish: German Steak (ジャーマンステーキ). Since a German would likely have called it a “Deutsches Steak” my guess is that it either came through the US or England after the Meiji Restoration (1868).
This milestone in Japanese history marked the restoration of the practical rule to a young Emperor Meiji and the end of its isolationist foreign policy. In addition to an influx of foreigners (and with them foods), attitudes about eating meat began to change, and western-style meat dishes became more popular, particularly in urban areas. With the introduction of mechanical farm equipment in the early 20th century, cattle started losing their place as workers on farms and increasingly found themselves on the menu.
Until the 1950’s Hambagu was mainly limited to western-style restaurants called Yōshokuyasan (洋食屋さん), but the maturation of food processing technologies expanded the reach of this high-end favorite into ordinary households, cementing its place as a staple of Japanese home cooking."