Many countries have arranged to do just that because they make a profit from it. The popular medical tourism desitinations provide world class care at a fraction of the cost of the same or inferior care in the US. The medical tourists pay cash on delivery. The providers make handsome profits, despite charging substantially less. Lots of factors behind why it works. Mostly rooted in market forces.
Not for free, but the UK's NHS for example are allowed to operate private clinics and some NHS trusts derive substantial extra income from that as a means to alleviate funding shortfalls while making better use of spare capacity.