If she wants to get out of engineering, that's something she can do at any point, on her own recognizance. She doesn't need my help to do it.
But, on the other hand, if she does decide she wants to continue as an engineer in our company, she's now added a kind of negative datapoint to my evaluation of her suitability, and for something that's not entirely within her control -- it's partly within mine. It's just a bad idea for her to do this.
It's not the only data point I have, and I tend to think that she'll actually do fine in engineering if she decides to continue down this path. But my job isn't to make her dreams come true, it's to find the people to make the best investments of the company's money in personnel.
Let's give a not-entirely-hypothetical. Let's say that Alice is the name of the engineer who expressed regrets about going into engineering (not her real name, to be clear), and Betty is the name of another, very similar engineer, who has expressed no regrets.
A tech lead spot is opening up in Alice and Betty's field. It's likely to be the only such spot in the near term. Alice and Betty are both seemingly good candidates for the job. But I have to be worried that whichever one I don't pick for the role will feel that they have no career path at our company, and quit.
Now, I could pick Alice. But I know that at least at one point in the past, Alice was regretting becoming an engineer. It sure would suck if I pick Alice, Betty quits, and then six months later Alice pursues her dream to go into business. Whereas if I pick Betty, and then Alice quits, well, maybe Alice was going to get out of engineering anyway.
I feel that I have to give some weight to this information I have about Alice. It's not that I dislike her or feel that she's weak for expressing doubts. It's that she's given me a reason to doubt that she'll be here long term, and if I'm going to invest a limited resource in her versus her peers, I want to do so with the most assurance possible that she'll be here long enough to make that investment worthwhile.
Ask yourself if it would be fair to Betty for me to pretend I didn't know this about Alice.