The transporter works the same way as the Federation economy. A wizard makes it happen.
. . . By the way what is to stop random people from beaming into other people's bedrooms and toilets?
What stops people from breaking into their neighbors' houses and stealing their stuff? Shared moral principles and the rule of law. But why was Scotty able to beam the whole load of tribbles into the Klingon battlecruiser's engine room? You'd think starships would have basic security measures to prevent unauthorized persons or objects from beaming aboard.
. . . Even today, by far the fastest way to get lots of information from New York to Paris is to only digitize the text and the numbers, put that data in a memory stick, attach the pictures in physical form, and send the envelope to Paris via a courier service...
Have you never heard of YouSendIt, WeTransfer or DropBox? Not instantaneous, but way faster than physical mail.