However, in practice, you can actually sell the application because quite a few people don't care if they can get it for free. For an example check out TOME [0]. It's a GPL game that's also available on Steam. It has a kind of online mode and the author has stated that something like 70% of the people who play online have paid.
What I find even more interesting is that he has exclusive DLC for paying customers and it is also licensed under the GPL. You can only get the content from the author and only if you have paid. Now, nothing is legally stopping others from distributing that content, but nobody does as far as I can tell.
One other interesting thing is that while you can't stop people from undercutting your price, you can stop them from selling under your trademark. So if you were Krita, you could specify that only officially licensed versions could be called Krita, and you are free to distribute the code under a different name. Branding is worth something (strangely) and this can keep your customers.
Like I said, I don't think it's a good idea for Krita, but it's far from impossible.
[0] - https://te4.org/