To be fair, patents are not really in line with the thinking of a free-market economy. But, because people seem to agree that innovation is important enough to cut a little bit off the bottom lines, they exist as an accepted (and often appreciated) government infringement.
Of course now we know that any gov't economic intervention leads to more and more, but that's another discussion.
The main point is that even the gov't understood that you ought not be able to patent stuff forever and ever, just long enough to make profit to cove your expense of innovation, and then a bit more as incentive to innovate some more. Though patent lives do seem to grow longer each decade, the basic idea is that they're an incentive to innovation, because in a true free market the window of opportunity where one has a competitive advantage due to an innovative product might not be enough to cover the costs, before the competition copies the technique/technology and catches up.
To be patently honest
the idea of a country enforcing internal laws in other countries is rather ethnocentric. In a laissez-fair situation if you couldn't get a patent in China, then the only thing to be expected in that China not try to sell copies of your invention in your country.
And in reality, even inside one's legal domain, their countrymen can easily rip them off too. If a moderately wealthy inventor comes up with something new a wealthier bandit can copy the idea, and then use their competitive advantage in economies of scale to generate more profit from the invention. This money they make is money that the originator does not make (for the most part) and the only recourse of the originator is legal action. If he does this then he takes away resources he desperately needs to compete with the bandit in the marketplace, and spends them on legal action (time and money). If the bandit can delay long enough, the originator will bleed to death and the bandit has no threat left to worry about.
(if they'd be really morbid they could buy the rights from the bankrupt innovator, and then make sure no-one does unto them what they do)