This is an interesting topic to me. Envy comes from comparing yourself to others which is a survival instinct. If you compare yourself to the best version of yourself, it's a growth instinct. So, envy is simply a matter of perspective.
My personal view is that our society is designed such that we are "trained" to compare ourselves to others. When you attend primary and secondary schools, teachers and parents focus on grades as a measure of success. Grades are a relative comparison of you and your fellow classmates. For those who are top of the class, you get credits from everyone. For those who are bottom, you want to just be like those top students. As a result, we are step-up to develop an "envy" mentality. For those who are fortunate, you will come across a mentor/parent who will value your uniqueness and start planting the seed that life should be about the growth mentality (competing with yourself).
This is probably one of the hardest weaknesses to overcome as it is ingrained in every one of us and it's a matter of "unlearning" it over time. Unfortunately, not everyone would reach that stage earlier in life.