Most books sell horribly, and not for reasons of low quality but because discoverability is a huge problem, even in today's world of recommendation algorithms and the like. There are a good number of "famous" writers who live in poverty, because the percentage of books that sell well enough to live on is so small.
Traditional publishers don't bother to invest much in a book unless they are sure it would sell without them (i.e., the author has 4,000,000 Instagram followers). The typical budget for marketing and publicity is about $300. The thing is, trad-pubs don't have to be better. They're inundated with unsolicited manuscripts ("slush") and even though very few of those are excellent, at least 5% are in a state where a competent editor could turn it into a book as good as any other commercial bestseller. They have all the power and, to them, authors are a fungible commodity. Oh, and if you think a literary agent is going to help you navigate this, well... unless you went to prep school with an agent, you won't even get _read_. You'll sit in a query pile, possibly get a glance by a 19-year-old unpaid intern, and get a form-letter rejection 18 months later.
You can self-publish, but less than 1% of the population has the savings and free time to do it right. It costs $10,000, minimum--you'll have to hire an editor, a cover designer, a formatter... and while you probably won't be able to afford a publicist you'll be competing against people who can--and non-writing efforts will take up at least a hundred hours of your time--some people find the marketing aspect fun and if that's you, great, but most writers don't, which is a big part of why so many of them pursue traditional publishing even though it's abusive if you're in the bottom 99%.
Allowing big-name authors to supercharge their apparent productivity by hiring teams of "co-authors" who do the actual writing exacerbates this problem. I don't see a good way to fix it, and what Patterson does probably shouldn't be outlawed, but it still sucks. The book world, in which name and "author brand" matter far more than literary quality, is already pretty moribund... and this kind of stuff doesn't help.