Another common example is MDs - quite a lot of private doctor's offices are contracted by the National Health Fund, basically providing their services for the public healthcare that way.
Clearly having multiple customers isn't a reasonable requirement for a small company. Software engineering isn't like private residential plumbing - "sink drain unclogged, next please!" :)
> good luck if your client decides they no longer need your services, suddenly you find out what the downside of being self employed is.
That goes without saying, and the same obviously applies if you're running a "regular" company, with employees, like a restaurant or whatever.
The risk is arguably even greater, as you will usually pile up some financial obligations (such as credits) and other commodities limiting your financial fluidity (remember Covid? Restaurant owners do).
By the way, you can insure yourself against loss of income. Many insurance companies offer this service.