I think that this is the same thing as jealousy and envy,.. but my question is that why is it a sin? If you're jealous that somebody has something that you want or got to do something that you really wanted to do,.. who exactly is that hurting? In the first case scenario it's not like you're stealing anything from them or anything.
The Tenth Commandment is intended to turn our attention inward. Paul discusses this commandment in Romans chapter 7. Bottomline: it's like this.
Actions:
Don't murder
Don't steal.
Don't commit adultery.
Inwardness:
Don't
want to murder
Don't
want to steal
Don't
want another man's wife
God is alerting us to a very important idea. While the Bible teaches us that we will be judged by our deeds; we are judged by them to the degree that such deeds reveal who we are inside. God cares more about who we are than what we do; and this is saying a lot because he also cares about what we do. It's as if God is saying, "not only do I want you to
act in a certain way; I want you to
be a certain kind of person." (And if I find that am not that kind of person, he hears my petition to be forgiven and perhaps to be transformed into that kind of person.)
I am constantly reminded of the song "Smooth" by Santana and especially the following line, "Give me your heart, make it real, or else forget about it." Through the Tenth Commandment, God is asking Israel and us to consider whether our worship is genuine. Is it real? Do we give him our hearts? Do we make it real?
If we can't make it real, then forget about it. God is speaking about purity of heart and he wants his children to ponder this and seek his guidance and strength.