Buying a gun is a very rare transaction happening 100% in the physical world and leaving no traces per se. Receiving/spending money here is digital in 99% of cases and is recorded forever.
I don't think they are illegal, but barrier to get a permit is relatively high.