The reason that hamburger is called hamburger is because the hamburger actually originated in Hamburg, Germany.
So it's not because hamburger contains any ham but instead it got it's name hamburger because of the place called Hamburg, Germany where the hamburger came from first.
Hamburgers are basically just a beef patty or ground beef from a cow added to hamburger buns and then made into a hamburger and sometimes topped with lettuce, tomato, onion, and sometimes cheese.
Although for hamburgers that contain cheese those are usually called cheeseburgers and not just burgers.
But hamburgers are also known as burgers in most places such as the USA but they are still also called hamburgers.