I don't know about the US, but in Canada I think it's illegal for renters to discriminate against pet owners. Many still do however.
There's a lot of stuff you can't discriminate on, but animal ownership isn't a fundamental right.
Pets were strictly banned, and rightfully so (it would be torture for them).
People do live in those apartments for long periods (in my case, I had some neighbors that were pensioners on small funds that couldn't afford something better, they've been living on those apartments for 15+ years)
I'm an apartment renter and I've lived near many dog owners. I make it a point to introduce myself and offer to walk their dog(s). Without fail, the dogs are beside themselves with excitement when I get them.
Dogs especially need lots of space and exercise. What a pet owner may think is a big enough apartment may not be.