Term for "to have a hidden purpose for being involved in something"?
Consider using hidden agenda:
An undisclosed plan, especially one with an ulterior motive.
[American Heritage Dictionary of the English Language, Fifth Edition]
As @Phil Sweet commented, you could also consider using "personal agenda" or just "agenda". I've just found a related question, Meaning of “have an agenda”.
Consider ulterior motive:
If you say that someone has an ulterior motive for doing something, you believe that they have a hidden reason for doing it ⇒ Sheila had an ulterior motive for trying to help Stan.
Secret intention or hidden ploy.
This is what happens when a hidden ploy is unveiled; it can never work the same way again, and can never have the same meaning or payoff for the perpetrator (The New Way to Compete: How to Be a Winner in Your Career and in Your Life, Harry A. Olson, excerpt on G. Books)