Many responses here focus on dodgy science being used for commercial purposes and fraud where the perpetrator had a clear motive in attempting to gain money or kudos. There are cases where the motive and the desired ends are much more complex.
An area that is complex and has wide ramifications but is not noticed too much here is creationism, or to apply its latest branding intelligent design. Before the 19th century all scientists were creationist of one kind or another. Charles Darwin came along and gave a much better explanation of the origins of living organisms as we see them. By the time that genetics was combined with natural selection ++, population genetics and a few other bits and bobs there was hardly a biologist who did not enthusiastically accept that evolution was the explanation, without which nothing made sense. So why is there a huge body of unscientific research aimed at refuting evolution?
The concept that science is the proper realm for understanding the topic requires a secular approach. This says that we keep matters of fact and evidence of concrete questions separate from matters of faith. There are many scientists who are theists and of those many are religious but generally they don’t use their faith to do science or their science to do faith. The Catholic church and most mainstream religions accept evolution as the explanation of speciation and find no problem maintaining their other beliefs. Most secular societies follow this pattern, the richer nations and in particular those of scandinavia, western europe, and New Zealand, Canada and Australia. Nations where religion plays a big part in polity are more likely to mix science, politics and religion. For example the Turks are strong believers in creation.
The glaring exception is the USA. It is up the top with the richer developed nations but it is also where it is standard to introduce religion into politics and politics into religion. The USA is the origin of modern creationism which grew to be significant in the 1930s. The Australian constitution (section 116) and that of the USA are similar in trying to keep the two apart but arguments about this have constantly run hot and been to their Supreme Court several times. Scientists have been playing whack-a-mole in court to keep creationism out of the school science syllabus for decades. In Oz you hardly hear of it and AFAIK it has never been to the High Court. From time to time we look like following the US in this but so far it hasn’t happened.
In the USA there is a group of loosely affiliated evangelical churches that incline towards biblical literalism. If you want to take the Book literally logically you have to take it all that way. This means the Genesis accounts of creation +++ must be the explanation for life on earth and so evolution must be wrong. Here is your predetermined outcome. Therefore the faithful have a duty to show evolution to be false. Here is your motive for doing unscience.
I am not going to go into the multitude of arguments: Wikipedia gives a good summary. It is enough to say that every known fallacy and debating trick is used and reused even when thoroughly debunked. In this respect creationism is much the same as other forms of denialism like anti climate science, antivaccs, anti water fluoridation, etc. The difference is that if you allow religion into politics these arguments gain much more grunt and significance. In the USA the religious right has huge impact on issues as diverse as foreign policy, education and women’s rights and voting patterns in general.
Where the motive to do bad science, or debating disguised as science, is money or fame it is not too hard to push back, although success cannot be guaranteed. When religion and politics become a blended voting block unscience takes on a life of its own and may be unstoppable. It makes sense to vote for how you want the country to be run. It makes no sense to vote for how life on earth got to be here or if gravity holds us in our beds at night.
++ Darwin knew nothing about genetics, which is the mechanism of inherited changes in body form in populations, he just proposed that such a thing must exist.
+++ There are two that contradict each other.