One interesting implication is that since people can view and modify the source code, patches and modifications to the software are shared.
This has always lead me to wonder if a diff file violates copyright as it includes some of the original source as context.
My understanding is that use a patch file as long as your patch doesn't include any copyrighted material it is fair to share.
A patch file does not necessarily have any of the original code, just the location info and the new value.
It's one of those problems that are solved only at the individual level but because of that are not going to be solved at all.
Copyright law can still apply. Just because I have your sources doesn't mean I can go and use them in my own software, or re-implement your patented algorithm.
"But how can I be sure that my customer isn't stealing my work?"
Well, ask someone to look at the source code they provide to their customers. Remember, we're in an imaginary world where source-included is the normal way to sell software, and anyone peddling binary blobs is seen as shady.
1. Obfuscated code. This is a classic, employed back in the day when raw machine code wasn’t quite as much of a barrier like it is nowadays. Less common now since its importance has lessened, but still ever-present, and could be re-employed instantly.
2. The very design of the software. For instance, the software might require a phone number for every user, and this is baked in at the very fundamental design level, making it impractical to change. Other design choices might encourage you to share your contact lists, for say, backups, and your data is now leaked.
3. The software is merely a collection stubs calling a cloud service. Very common now with so-called "apps" for phones. This design has come to its pinnacle with “web page apps”, where only the front-facing UI portion sits on the user‘s control, and the rest runs remotely.
This is why “shared source” and the like is not enough. The end user must have the practical ability to, reasonably easily change the software, either by themselves or by hiring anyone they like and/or trust to do it for them.