crimes are only illegal if you get caught

The statement you mentioned is a common saying or belief, but it is not accurate. Crimes are defined by the law and are illegal regardless of whether someone is caught, charged, or convicted. Committing a crime is an act that violates the established legal system and can carry consequences such as fines, imprisonment, or other forms of punishment. The legal system aims to deter and prevent criminal behavior to maintain social order and protect the well-being of individuals and communities.