A means to an end is an idiom. It is used when something you are doing (work) is not as important to you as what you hope to achieve by doing it (in this case, probably money). Whoever says this does not really enjoy their job in itself, it is a job they are just doing to earn some money.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.