Yes, if there's only one employer in the entire country then you're stuck. If the context is a communist country I'm happy to modify the advice. Except even then it's still "leave the employer and go somewhere else".
You thought A is great but you think you can find better so you go to B. They turned out worse, you then tried C and those weren't great either. But now A won't hire you back because they already filled the position, and there are no other available companies doing the thing you want to do. Now you're stuck with inferior employment options compared to the choice of not changing jobs in the first place, unless you're willing to do something else entirely or start your own business.
Depends on the field obviously, but there are reasons why people might want to stick with a not-so-bad job instead of looking for a perfect one.