Actually, the transgender / bathroom issue is real, but its used largely as a smokescreen for the fact that this law is, in fact, a direct attack on the LGBT community as a whole.
The law doesn't just mandate bathroom uses, but also removes the ability for any local government to pass any anti-discrimination legislation that is broader then the state definition (so much for small government). Specifically, laws against employment and housing discrimination of gay people.
In most places in the country, you can be fired for being gay. You can be denied an apartment because you're a lesbian. Only a few states actually include sexual orientation in the protected classes, even though polls repeatedly show most people think they're already protected. They aren't. A few communities, usually urban ones, are (with support of business interests) trying to add local protections.
And every time one of those communities does it in the south, suddenly the proponents of small and local government freak out and passes a state law taking away the local right to legislate the issue within their communities. NC is only the latest, and they did it using the bullshit 'protect the children from perverts' smokescreen argument around the Transgender bathroom issue.
There has been basically zero cases of men dressing up as women to try to get into a bathroom to assault women or girls. Rapists are going to rape and this won't protect anyone. Its a non-issue. Its a complete lie, a complete fabrication because while more and more people have friends and family members who are gay and are more and more finding it impossible to justify discrimination against the LGB community, Transgendered people are still relatively rare and the idea gender dysphoria is hard to relate to, so they're made easy targets.
But the laws that allow discrimination against them are -- every time -- broader then they're made out to be, and actually target the any community that might not be enshrined in the state law. Which is the entire LGBT community.