Welcome to the reality of an expansive legal system. Sure, you cannot be punished for exercising your rights, but what that really means is that the police will try hard to find something to charge you with when you dare to stand up for yourself. It's not like you are being punished for exercising your rights, you were just punished for breaking the law.