The main function of a priest is to offer sacrifice to God.
So, the person who thinks he wants to become a priest has to be able to please God.
Being a priest is a very demanding vocation. It is only for people who are psychologically stable. If someone has an inclination toward crime, for example, then you do not want people like that in the priesthood and it is unlikely that someone who has criminal inclinations would be accepted into the seminary and it is unlikely that a criminal would be able to accomplish the studying of years … which is necessary.