It's well established science that you should be doing about 5-15 repetitions per set, depending on whether you're focusing on hypertrophy or strength (overkill for non-professionals to even make the distinction, just stay between 8-12) — if you can do more than that then the exercise does not offer enough resistance, and if you can't do enough repetitions then likewise it's suboptimal (just like trying to lift a truck is a suboptimal exercise).
So, whenever your exercise using your own body weight as resistance offers you just the right amount of resistance to keep you within that range, then it's great. Most of the time though, it will be well outside of that range — so in the general case, using body weight as resistance is bad advice.
It makes it a completely different exercise altogether — the shoulder press exercise is not a substitute for the bench press and is nowhere near as efficient an exercise to build your chest muscles.