It's not illegal in the United States. It's probably against the terms of service but that is up to the company to enforce, and has nothing to do with the legal system.
It's hard to imagine how an account holder could authorise you to access Netflix in a situation where Netflix explicitly communicates to you that such account sharing is forbidden.