It’s a oft-repeated guideline in the US that you should spend no more than 1/3 of your income on housing (rent, mortgage + property taxes + ....).
It’s not a law and it certainly doesn’t apply to all people or locations. Some lenders might use it as a heuristic though.