Your tech job is not going to lead you to riches.  It's going to lead someone else to riches.  You've given up a quantifiable portion of your life in order to ensure that someone else makes their dreams come true.  The question of how much you are compensated depends exactly how much the opportunity cost of giving up your dreams is worth.

One of the most important mistakes that companies make in hiring technology professionals is that they put them all into the same category - people who are motivated by technology and intellectual challenges, but it is really much more complicated than that.  There are four archetypical motivating factors, and understanding them is essential to developing a good working relationship with employees.

During the Cold War, both the Soviet Union's KGB and the United State's CIA developed personality models for evaluating a potential asset, and those personality models centered around four major axes of motivation.  At the time, those could be abbreviated as MICE: Money, Ideology, Compromise, and Ego.

This is not a qualitative comparison of what makes a good employee and what doesn't but rather a study in the different ways that people are motivated, and why you might not be enjoying your tech job.

Money

Some people take positions in the technology sector with the understanding that they will get paid handsomely every two weeks, and possibly when their company gets bought.  Historically speaking, technology jobs did not pay well until some time in the 1990s.  Engineers were not seen as a bringer of profits, because for the longest time, technology was not ubiquitous in everyday society, and was instead viewed as a luxury item.  For the longest time, there has been a stigma in telling a potential employer you're doing it for the money.  One could argue that this is a form of virtue signaling by prospective employees so as not to offend the true believers.

Ideology

The true believers in the technology space are people who assert that they would be resistant to taking an obscenely high paying job if it involved working with unsavory technology or perhaps a company with a less-than-stellar human rights record.  Falling into this category are your diehard UNIX fanatics who think that all Windows technology is not fit for consumption and that Mac users are snobs.  In a lot of cases, these highly gifted individuals limit themselves by not considering certain technology stacks.

Compromise

Some people get into technology because they want to give themselves a better life.  They see that this is their ticket to happiness and they are often the most willing to be flexible about what they are doing or how much they are getting paid, because for them it is seen as a necessity in order to afford a certain lifestyle.

Ego

The last group of people are the people who get into technology because the enjoy the power trip that comes from having some degree of power over others' actions, data, and livelihoods.  A lot of these people can be the most loyal if their ego gets regular attention, like a flower garden, always being watered and supplied with opportunities to showcase their talents.

Conclusion

Armed with all of this information, if you are working for a manager who only understands one, and not all four of these facets, you may find that what is offered to you as a form of motivation doesn't appropriately line up with what you actually need.