I can come to any bank, and politely ask them to help me out a bit by giving me some money. That's not an illegal (or wrong) thing to do.
Now if the bank does help me out by emptying out their customer's storage cells, someone's going into jail for that.
See, it's fine to help out. It's not OK to do so at someone else's expense. In this case, Motel 6 gave away something that's not theirs to give away, according to the law (namely: their customers' data).
Motel 6 did not break the law by helping out the feds. It broke the law by harming their customers (sharing their customer's data).
In the end, it's normal to ask for help. It's also pretty normal to politely decline to provide it.
Title nitpick: Motel 6 illegally gave away this information. They broke the state law, were sued for that, and lost $12M (and made further commitments on top of that). Why NPR chose to soften it to "improperly" is beyond me; the attorney general quoted in the article uses "illegally" in the same sentence.