In 1986, the Donkeys inserted a provision into a pro-gun bill that outlawed the sale of new production machine guns. MG sales were limited to: 1) the U.S. military; 2) to LEOs or law enforcement agencies; or 3) dealer samples. Dealer samples could only be sold to other Class III dealers to law enforcement or the military. Since the 1986 law change, machine guns can be owned by civilians as part of a trust (but I'm not savvy on all the details here). Also, all legally owned machine guns before the effectivity date of the 1986 law change can continue to be sold. The problem with these guns are: 1) the pool of transferable guns is shrinking as guns wear out or Ka-Boom; and 2) because the pool is shrinking the prices of these guns has skyrocketed.
In so far as Mr. Brady is concerned, he owned his collection before the 1986 law effectivity date and so all these guns were grandfathered (that is, they can be sold to private parties). At the time (before he was shot by Hinkley), Brady was quite rich and could afford what he wanted.