Learning to play music from a score on sight requires a particular set of skills. It requires some understanding of music theory (to allow the score to be understood), some understanding of musical style, development of a sense of rhythm, development of finger strength and dexterity, and of course the student must build up the key skill of being able to rapidly read through a score and map the dots to a set of fingerings.
Learning to play from memory requires some different skills, but many of the same ones. Most people (unless they are incredibly blessed when it comes to memorisation) will still need a good knowledge of music theory, in order to be able to build up a map of a piece in their mind. They'll need that skill of internalising the details of a piece. They will probably need an even stronger sense of counting and timing, as the written music is not there to share the load. But of course if you're playing from memory, you don't need the raw reading skills.
Ultimately, a teacher's job is to teach the student what will be of benefit to them. If a student is clear that they only want to learn to play from score, then it seems reasonable to focus on that - but simply telling the student not to learn the score seems an odd way to go about it, as it's impossible to simply "switch off" one's memory. A better way would be to teach the student to cope with genuinely unseen scores.
If an instrumental teacher has no reason to think that a student wants to focus only on one set of skills, my opinion is that the teacher should be aiming towards teaching a balanced set of skills - which of course would include learning to work out a piece by ear, and play from memory.
Is it beneficial then, to learn the music, as opposed to 'just' learning to play it?
Ultimately, it just depends what skills you want to end up with. Any skill is good to have in and of itself, but all skills take time to learn, and invoke an opportunity cost in the time spent. Generally, different musical skills tend to reinforce each other rather well - which is why I think a teacher's presumption should be towards teaching a balance of skills.