I personally want to do a good job, but some companies make that hard to employees, albeit sometimes inadvertently. Whether it's by tying people up in politics, having them do busywork, or just failing to reward them.
To give an example, at one of my previous jobs, for several years in a row I was noted by my managers as being a high performer and someone who would be ready for leadership. Despite this, I got an average (you did good but that's it) performance rating, because only a few people could get the higher rating. The first year I had just joined so I was excluded by default, the second/third year other people ranked higher and because that rating only went to about 2 people, I missed out. When after this my manager approached me about a lead role, which was extra responsibility but no extra pay, I was pretty much done.
When I was in my 20s-30s I hated people who seemed like they checked out, but I understand that a lot more now. Again, I'll do a good job regardless and if I don't get rewarded for that, I'll find the door and go elsewhere, but I completely understand why people who don't have that luxury or drive would rather keep their heads down and just go through the motions.
You may want to take some time to reflect on the issue you articulated in your second paragraph.
So you 'did a good job' and the company maybe indicated there was a future for you, but they couldn't fulfill it. That's not hugely nice.
But can you fathom for a minute that it seems your peers were doing 'An Even Better Job' and perhaps better suited for advancement? At least in the eyes of the company?
Put on your 'Management Hat' for a moment and understand that maybe it's unfortunate you thought there was an opportunity where there was not, but that those kinds of indications are fleeting anyhow.
Someone thought they were going to Lead the League in Scoring until it turns out they didn't.
At very least, despite the companies misrepresentation, a lack of professional maturity for young devs. to assume that 'hope' is a guarantee of anything. When you're a manager, you're a manager, before that, it's all talk.
This scenario isn't even a 2 out of 10 in terms of the mistreatment or misappropriation of employees - it's just a mostly normal thing that happens in noisy channels.
Maybe they were thinking of advancing you - someone else came along. That's life.
I'm glad you seem to want to 'Do A Good Job' regardless, but it should be noted that you're not comped for future prospects of advancement. So in this situation just 'Doing A Good Job' would be an expectation of the job. Not some thing you do on the condition of some future event.
If you are mistreated, obviously, that's not good, and it's the company leadership 'Not Doing a Good Job' but I don't see a strong indication of anything other than normal operations here.
To give an example, at one of my previous jobs, for several years in a row I was noted by my managers as being a high performer and someone who would be ready for leadership. Despite this, I got an average (you did good but that's it) performance rating, because only a few people could get the higher rating. The first year I had just joined so I was excluded by default, the second/third year other people ranked higher and because that rating only went to about 2 people, I missed out. When after this my manager approached me about a lead role, which was extra responsibility but no extra pay, I was pretty much done.
When I was in my 20s-30s I hated people who seemed like they checked out, but I understand that a lot more now. Again, I'll do a good job regardless and if I don't get rewarded for that, I'll find the door and go elsewhere, but I completely understand why people who don't have that luxury or drive would rather keep their heads down and just go through the motions.