How do those 2 programs find out about each other?
Well, they need to use some server that will connect all users, allow you to find the other person in order to send them a file.
Even BitTorrent needs tracker servers to connect downloaders to uploaders.
Now, you could try to make it run without a company behind it, like BitTorrent.
I guess it's an exercise for the reader.
Someone still needs to run those connecting servers out of the goodness of their heart.
You would need to degrade the usability (the first thing a user would need to do is to configure the app with the address of at least one connecting server).
BitTorrent is anonymous but for sending files you need to connect to a person you know. If you enable contacting via the protocol, it'll be a phishing nightmare.
So you'll have to degrade usability some more and use a side channel (e.g. an email) to exchange identities with people you want to send file to (or receive files from).
By having a service and a company behind it, they are able to perfect the UX and run the necessary servers to implement that UX.
Magic Wormhole is cool (I just learned about it! Thanks! :)), but most people don't use nor care about the command line, and are probably afraid of it.