Bileam was a man of profound spiritual achievements. His understanding was at level of that of Moshe Rabbeinu. Bileam was also evil. How can this be?
After Bileam did not succeed to curse Israel, he understood why. He advised Balak that there was one way to hurt the Jews - by drawing them into sexual sin. Bileam had understood the great difference between himself and Moshe, between himself and the Jew. Mah Tovu Ohaleicha Ya'akov, how goodly are your tents, Ya'akov. Ya'akov was holy. Moshe was great and holy. Bileam was great and unholy. He was steeped in sexual sin.
Human status is naturally related to Gadlut, greatness. Not to Kedusha, holiness. This should have been different in the world of Torah, but often it is not. What counts, is to be a Talmid Chacham. The Torah warns us. It is possible to be Bileam. It is possible to be Gadol and to not be Kadosh. It is good to be Gadol, but only if one is also Kadosh. Without Kedusha, Gadlut does not help. Even worse, it hurts. Bileam was evil. Without Kedusha, Gadlut leads to evil.