For fresh starters doing a technical job, guess the best thing is to get exposure to various functions within organization.
Do a good job for the present role, always look out for opportunities that may lead to other roles.
For the cases you mentioned, I guess he/she has not really justify why he/she wants to move to another role.
The person should take initiative to convince manager that an opportunity for him/her to practise in other role benefit both the company and himself.
After all, being very good at something does not necessarily mean that he has true passion for it nor does it say he is willing to stay in that line for long.