In a large skillet over medium-high heat, brown the ground beef for 7–9 minutes, breaking it up. Drain excess grease.
Transfer beef to a bowl. Add diced onion, bacon bits, mayo, ketchup, mustard, salt, pepper, and onion powder. Stir until fully combined.
Preheat oven to 400°F. Butter 6 slices of bread (¼ cup margarine), cut in half, and place butter-side down in a greased 9x13 dish.
Sprinkle 2 cups of shredded cheese over the bread layer.
Spread beef mixture evenly over cheese.
Top meat with remaining 2 cups of cheese.
Butter remaining 6 slices of bread, cut in half, and place butter-side up on top.
Bake uncovered for 20–24 minutes, until the top is golden and cheese is bubbling.
Let rest 5 minutes before slicing. Serve warm.