You need to get a library card, and some libraries have an aegis that covers larger groups of people (for eg all Californians), while others only cover those that live in a given city/town.
So no, it’s not unethical, unless you’re pretending to live in CA (or wherever) when you don’t, in which case why bother with getting a card and app and just torrent.
Just find libraries in your city first, then check the counties and neighboring cities, as they usually have reciprocal agreements, or may be part of a regional network for ebooks. Then check the state (in my experience, state libraries are open to anyone that lives in the state, but you generally have to show up at the branch with an ID and proof of residency).