And by often, you mean "actually pretty rarely." In any case, sterilization doesn't solve the problem of crime, which is primarily a result of environment... And a society that sterilizes criminal is not a society with an environment conducive to functional, happy, non-violent people.
Not all discrimination is equal. Racial discrimination sits on far less solid ground than genetic discrimination, which on a societal level is even shakier than cultural discrimination (us vs. other). And, in any case, what is desirable about a society is entirely subjective... So until we know for absolute certain what is best, engaging in widescale eugenics doesn't really make any sense. Perhaps the ideal world is composed entirely of people with Down's Syndrome.