I think this popular advice is flawed. It's survivorship bias in advice form.
If you happen to have a good profitable problem you go solve it and become successful and then turn around and say "Look! I solved my own problem".
There exist many people whose own problems are terrible for turning into a product for many reasons. They would be better off if they attempted a more practical problem that was not necessarily their own.
I also see founders reverse-engineering their story to mask the fact that they just went after a feasible profitable idea.
For example they create a customer support software (as an example of a crowded competitive field).
But because it's not sexy to not have a dreamy story they manufacture some forced story line like "We were running this small consultancy company and needed customer support software. After trying tens of existing solutions we just weren't happy with their X,Y,Z so we decided to solve our own problem for good!".