What is the meaning of [crime doesn’t pay]

Criminal activity may seem to be profitable, at least in the short term, but it ultimately leads to far greater loss—of liberty, or even of life;used as a deterrent slogan.