If they realize that the company cannot provide what you are looking for then they may not want to invest more resources in keeping you around, or keeping you happy. If they realize that you find some sort of intrinsic reward in certain work, then they might put you last for raises, because the money could help them more when spent on other people.
It's best to selectively reveal only your immediate short-term goals, only at the current company, and only as part of an ask. Always make them pay for information, if you are going to reveal what you want, then they need to reveal whether they intend to help you or hinder you in getting it. Slow answers, non-answers, pushing to next quarter, etc. All signal that they intend to hinder. It's rare to get an honest, fast "no".