Software copyright and ownership issues are murky. If they were clear cut, would Facebook be running right now?
Facebook is a great example. It depends on who you believe, but it appears that Mark Zuckerburg worked on a site that was similar to Facebook, but geared towards Harvard students. For whatever reason, he bailed and started Facebook, which was pretty much the same thing, only with a bigger scope, and better.
If he stole some PHP code, is that unethical? If he stole the idea, is that unethical? What if the guys he was working with were idiots who didn't really care, and were going to only pay attention to their rinky-dink site when they weren't at rowing practice? Is it unethical to grab someone elses idea and run with it when you know they are just going to let it lay fallow?