It's good advice in the abstract, and at the very least, following it won't
hurt an aspiring novelist. At the same time, following the advice to the letter won't guarantee anything. As you point out, there's a business behind selling books. Most unsolicited manuscripts are probably pretty bad, but even the good ones aren't guaranteed to get past the slush pile.
For more business-oriented advice, I'd suggest the following:
1) Write great books. Rather than elaborate, let's leave it at that. Writing great books is table stakes. If you aren't sure your manuscript is great, show it to as many people as you can, and get no-bullshit opinions. Show it to any professionals you may have access to. Go to workshops. Etc. If you're pitching agents or editors on your first, second, or even third draft, you're rolling dice loaded heavily against you.
2) Have a specific audience in mind. Do your homework here. Understand how the publishing world divides and categorizes fiction markets. This matters not only for your query letter, but for your book itself. If a publishing exec can't make sense of where your book fits into the market, she's not going to take a chance on it. Understand the rules of the categories. For instance, what's the difference between Young Adult and New Adult? What gender is your protagonist, what age, and do these fit your intended audience and category? Publishers will expect them to, and their expectations will be specific. Learn how they think.
3) Have a "platform." This is increasingly important nowadays. Your "platform" is publishing industry-speak for the sum of your online and offline presence. Have you appeared in the media? Do you write short stories, or even fan fiction, with a reasonable following? How active are you on YouTube or Twitter? Bonus points if you are telegenic. 2x bonus points if you are young. But even if you're neither of those things, build a following as best you can. Participate in fiction communities, subreddits, and workshops. If you're a fantasy or sci-fi writer, go to cons with your work in hand. Blog, and maintain a readership or mailing list. Publishers are very risk-averse, and they want people who are prepared to hustle on behalf of their novels.
4) Be prolific. If you're the kind of person who can produce 2-3 novels in the time it takes an ordinary writer to produce one, you're at a significant advantage. This is especially true if you're self-publishing. Self-publishing is a catalog game; your goal is to build up an audience by constantly producing new work. One-and-done is a terrible strategy for self-publishing.
5) Try to find a mentor. Not just for your writing, but for your platform. It doesn't need to be Stephen King, or William Gibson, or Suzanne Collins, or anyone of that stature. A successful midlist author can be a great mentor. A fanfic icon can be a great mentor. Anyone whose writing your admire, and who has the ear of an audience you intend to publish for, can help you out significantly.
Of all these bits, however, #2 is the most frequently (and perilously) ignored.