You can do something inappropriate anywhere.
If someone said "I stayed at a motel last night" I wouldn't have any ideas about anything inappropriate.
There is the idea of something called a "no-tell motel" where you can and go pretty anonymously, but to be honest, you can do that at a hotel too.
I wonder if motels are somehow linked to drugs, prostitution or things like that.
Like ANYWHERE, they can be linked to that.
98.5% of the time, they are linked to "getting a night's rest while people are on the road."
As someone who has stayed hundreds of nights in motels, I can assure you I've never done drugs there, smuggled in immigrants there, or obtained any money for sexual services there.