A company with a high P/E is by definition not making much money for its shareholders, relative to the size of their investment.
Unless you mean that the share price may appreciate. That's absolutely a thing, but it's a dangerous game. Of course plenty of people have made fortunes this way; people have also lost fortunes; I think the advice to steer away from such companies is basically a statement about risk.