And that's exactly where the much hated patents (software or otherwise) would have a role, in my opinion; protecting hard-earned innovation. That's what they're supposed achieve, but due to the completely broken patent system, they're only good for "patent trolling".
As far as paying for R&D goes, how much does it take to replicate something? I'd say a fraction of the cost since you already have the product in front of you. All you need to do is duplicate it.