Nzall did a good quick summary on the question already, but since Wigglenite mentioned the move fling, I think my answer can provide additional useful information.
As from Bulbapedia about held Items:
Though most items can be held by a Pokémon, many have no effect while held. Key Items and HMs cannot be held; in Generation IV, only Giratina can hold the Griseous Orb, and Apricorns and Poké Balls made from them cannot be held; from Generation V onward, TMs cannot be held. Any other type of item may be held, but medicine (except Berry Juice), TMs, evolutionary stones, Fossils, Repels, escape items, battle items, valuable items, exchangeable items, Mulch, Flutes, and Wings have no effect apart from changing the power of Fling and increasing the damage taken from Knock Off (from Generation VI onward). Poké Balls have no effect while held and cannot be flung.
In the case of the Master Ball I would strongly assume the purpose of the trade was a transfer of the item to another trade file.
Even if it was a wonder trade, some people have no use for their Master Balls and like to give them away to make someone else happy.