Something that people don't seem to realize is that you can 1) sell FOSS software at all; and 2) even the strongest copyleft licenses don't make you release your code publicly, all they require is that you make the code accessible to the users of your software and that you can't prohibit them from redistributing the code you gave them if they chose.
Weird edge cases: both the Reciprocal Public License and the Sybase Open Watcom Public License do require the public release of modified code.
This kind of copyleft is so strong that it isn't Free Software anymore: Debian, Fedora, and the FSF have duly rejected both licenses. But for some reason they are accepted as Open Source by the OSI.
You only need to agree to the GPL to redistribute your possibly modified copies. Because as per normal copyright law you wouldn't be permitted to unless you had a document like the GPL stating that you that you can! In other words if you didn't agree to the GPL & redistributed those copies you have no right to do so.
masto instance for the tildeverse