Just watched a cooking show on 4ME (channel 64) and one of the recipes was the perfect burger. The chef fried the onion in olive oil before adding it to the burger mix. With about a minute to go, he added garlic to fry with the onion because garlic takes less time. Once the cooked onion and garlic cooled, he added them to the mix of ground beef, parsley, ketchup, Tabasco, beaten egg, breadcrumbs, salt and pepper. The other interesting thing was that he sealed the burgers on the hot frypan off the heat, and then put the pan on the heat, turning the burgers every 30 seconds till done.
I can understand why he fried the onion and garlic before adding it to the mix... the fried flavor would be absorbed by the mixture, giving extra depth.