Which is what AWS used to outprice elastic and redis.
Under the GPL, a competitor can certainly take the code, rebrand it, and sell it as their own but they are required to provide the full source code of whatever "borrowed" GPL code they distribute to the end user. This ensures that the source (and whatever changes/additions are made) cannot be taken and locked up by someone else, which is possible with more permissive licenses like the BSD and MIT licenses.
This is not true for all open source licenses. Copyleft licenses such as the GPL and its variants prevent this.
Someone can distribute your software instead of you and thereby lock you out of any profits there, especially if they undercut your price (in the limit case they can distribute your paid software for free), but certain open source licenses prevent retroactive locking as proprietary software.
If they are just abiding by the license, would that be considered "immoral"?