Not necessarily, that advice usually assumes that you either are the subject expert or that your job is scoped and therefore benefits from being able to rush a job to maximize compensation
If you can bill by the hour, you benefit from the customer figuring it out on the go, which will take longer, but also be better fitted (If you can make it work)
If your job fits in "I'll make your X twice as good" or "I'll implement this standard" bill by the project, so you don't get punished for being more efficient; if it fits in "we'll solve your software problems", bill by the hour and you'll be rich, because they won't run out of problems to throw at you
If you can bill by the hour, you benefit from the customer figuring it out on the go, which will take longer, but also be better fitted (If you can make it work)
If your job fits in "I'll make your X twice as good" or "I'll implement this standard" bill by the project, so you don't get punished for being more efficient; if it fits in "we'll solve your software problems", bill by the hour and you'll be rich, because they won't run out of problems to throw at you