Both are valid reasons by the way. For everything we do, there is a personal and a professional purpose and in this case: both serve each other. For example: When you contribute to science, that advances your profile and when you have a well-standing profile, you get more resources that enables you to add more to science. It would be dishonest for someone to say: I care only or mainly about science and not my future/career. But we try to serve both and the benefit is mututal to science and the individuals.
Research is carried out for both objectives. To increase scientific knowledge and to find solutions to some problems at the local level, as well as to add to the professional biography of the person at the professional level as well as for scientific promotion.
What is the objective behind research for a researcher? Is the prime moto is to add the one’s own cv or to enhance scientific knowledge?
General objective for a research is contributing to scientific knowledge. But once you'd done that & published in article, this can be appended into your CV. Hence, answer to the above question is not "either or" but rather the 2 objectives can be achieved together or one after the other.
To some researchers, their research might carry other objectives e.g. promotion, better pay scale, want to serve as an authority / subject matter expert in certain research area, so that they can supervise other post-graduate research in specific area etc.
research behind research is based on the principal of proving something, disproving something, redefining the concept, rediscovering the dimension, validating the instrument in different context , measuring the phenomena in new directions and redefining concept and contributing into existing knowledge.