Great question! Soaking onions in milk before frying serves a couple of purposes. First, the milk helps to neutralize and mellow out the pungent, sharp flavor of raw onions. This gives them a more mild flavor.
Second, the milk actually works as a tenderizer and softens the texture of the onions.
Finally, when it comes to frying, soaking or dipping the onions in milk (or buttermilk) helps the flour and seasoning mixture adhere to the onions better, creating a crispier and more flavorful coating.