An individual who prays according to all of its conditions but commits major sins is worse than a person who does not pray but commits no major sins. This is because if a person commits a major sin, even though this is an extremely evil act, it alone does not take a person out of the religion. However, if a person stops praying, this is an act of kufr (disbelief), and takes a person out of Islam.
In an authentic hadith, the Messenger of Allah (peace and blessings of Allah be upon him) said:
الْعَهْدُ الَّذِي بَيْنَنَا وَبَيْنَهُمُ الصَّلاَةُ فَمَنْ تَرَكَهَا فَقَدْ كَفَرَ
“The covenant that distinguishes between us and them is the Salah (prayer); so whoever leaves it, he has committed Kufr.”
Reference: Ibn Majah Book 5, Hadith 1132
In another hadith, narrated in Sahih Muslim, he (peace and blessings be upon him) said:
بَيْنَ الرَّجُلِ وَبَيْنَ الشِّرْكِ وَالْكُفْرِ تَرْكُ الصَّلاَةِ
Between man and shirk (polytheism) and kufr is the abandonment of Salah (prayer).
Reference: Sahih Muslim Book 1, Hadith 154
This doesn’t, by any means, suggest major sins are something small. People will be punished severely because of them. However, leaving off the prayer is worse.
And Allah knows best.