The Twins DFA'ed him to make room for another player, which gave them (I forget exactly) 7 or 10 days to do something with him, but apparently they didn't place him on waivers (which last 3 days and can take place anytime during the DFA period) so as to be able to outright him to the minors themselves. I infer that they had good reason to believe that more than one team was ready to scoop him up, if they had put him on those waivers, so they managed a tiny bidding war for Megill and took the best tiny offer they got. Good for them, versus just losing him.
Megill is currently listed on the Brewers' 40-man but in the minors, so at least the outline of what I've said here is probably right. If Megill had actually cleared waivers, the Brewers would have had no reason to add him to the 40, and could just have placed him in AAA, "outright" as they say.