Restrictions with pets applies to rentals only, however, you did not state if you are inquiring about a rental. The issue has to do with liability. Landlords and property managers can rent to tenants who are willing to pay for pet insurance with liability and damage coverage, however, most tenants refuse or cannot afford to pay for pet insurance. Pet insurance is expensive. Landlords could add a fee to tenants with pets but that fee will also be very expensive and tenants will refuse or cannot afford an extra fee on top of their monthly rent.
When you live in a single family house, you can have as many pets as you want within your town's zoning laws because as the owner, you are responsible for any liability or damage issues. When living in a building or somebody else's house, you are a tenant and not responsible for liability or damage unless you buy pet insurance for that purpose.