According to the Ramchal, this special status isn't for just keeping the Torah. It is a result of purifying the physicality of the body. Also, Moshe did achieve this status in some form, although I don't know if it is lower or higher than what Eliyahu achieved.
Daas Tevunos siman 70
כי אין סוף הכונה בביאת הנשמה בגוף, לשתחיה אותו בחיי ההבל האלה, אבל עיקר בואה בו הוא, לזכך אותו זיכוך ממש, להעלותו משפל מדרגתו החמרית וחשכה אל המדרגה העליונה, להיות כמלאכי השרת. ודבר זה מצאנו כבר במשה רבנו ע"ה, שזכה וזיכך את חמריותו, עד ששב למדרגת מלאך ממש, וכבר ראו כל ישראל כי קרן עור פני משה. וחנוך ואליהו נתעלו לשמים בגופם ממש, אחר אשר זככו את חמריותם זיכוך גדול
The point of the soul entering the body is not to live this life of vanity, but rather the primary point of its coming into it is to literally purify it, to bring it up from its low level of physicality and darkness to the uppermost level, to be like the angels. And we find this by Moshe Rabbeinu, who merited and purified his physicality, to the point that he returned to the actual level of an angel, and all of Israel saw the shine of his face. And Enoch and Eliyahu went up to the Heavens in their actual bodies, since they purified their physicality greatly. (Translation mine)
I don't know how this "purification" is done, but let's say it is accomplished through refraining from engaging in physicality. It is possible that someone could have "sinned" more but in the bigger picture have accomplished this "purification" to a higher degree by greater refraining from engaging in physicality. It is also possible that they did teshuva for any sins they did, and on top of that achieved this "purification" to a higher degree.