You can get locked up for lots of irrelevant things in every developed country. Except in most countries that is seen as a last resort, so cops aren't particularly inclined to arrest people if there is another way, and judges aren't particularly inclined to jail people.
The problem is mostly cultural, not legislative.