Scientology is what happens when a science fiction writer acts out a dystopian plot in real life instead of writing a novel.
Read Stranger in a Strange Land, read about Hubbard and Heinlein's friendship, and look at the timeline of when Scientology started and Stranger in a Strange Land was published.
From reading https://en.wikipedia.org/wiki/Jack_Parsons yesterday after someone posted a link to it in the comments for another thread, I came away with the impression that Hubbard seemed to be into some pretty weird stuff long before scientology.
That may be true however today it is 2026 not 1961, LRH fell off the earth in 1980, and it is feasible that after the raids in 1977 and/or upon gaining tax-exempt status in 1993, some sort of deal was cut with the US state/intel apparatus to co-opt the church for another purpose