It's only immoral if you mislead them about their career opportunities post-graduation. You should help the student make an informed decision to do a PhD, and if they know what they're going into but choose to do it anyway, it's not yours to judge them for their decision. Refusing to supervise someone because you think they'd do better joining industry directly imposes your choices over theirs, and comes across as arrogant (the student would likely go to another university anyway).
If this concerns you, consider having a serious conversation with the student about their career goals before agreeing to supervise them. Make it clear that it isn't an "admissions interview" in the sense that you will supervise them if they want it, but you want to make sure they really want it because of the post-PhD career experience. That's important because "what do you want to do after the PhD?" can be stressful for the applicant to answer if they believe admission is on the line.
Talking points with the prospective student:
- If they want to have an academic career, point out that it's hard, it's especially hard if a significant other / children is involved, it could require working on a "trendy" topic, etc.
- If they want to have a career in industry, then construct the PhD project to accommodate that. It doesn't have to involve a topic with industrial applications, but it should involve transferable skills. For example, in recent job advertisements I've seen for PhD graduates, some key skills asked for are Python/C++, SQL, statistical data analysis (multivariate analysis, sampling methods, etc), and so on. The more of these skills can be included in the PhD, the better.
- If they want to have a teaching-focused academic career, again try to get them the necessary experience: conducting classes, grading, maybe even helping with course design.
If you're really concerned, you could look over some job advertisements with the student (try searching for jobs that require 'phd in [your field]') and discuss how to acquire the core competencies asked for.