To make the burgers, combine the beef, egg, grated onion, garlic powder, salt and pepper in a medium bowl. Mix until combined and then form into 6 thin patties.
Spread the butter on 1 side of each slice of bread. Heat a large, heavy-duty skillet or griddle over medium-high heat. Cook the burgers to desired doneness, about 3 minutes per side. Drain on paper towels. Drain the grease from the skillet.
In the same skillet, place 6 slices of bread, butter-side down. Top each with a slice of cheese, if using, some sliced onions and a burger. Top with the remaining cheese, if using, and bread, butter-side up. Cook the sandwiches until golden brown, about 2 minutes per side.
Serve with mustard, ketchup, tomatoes, pickles or any other desired hamburger toppings.