Why "science fiction" and not "scientific fiction"?
One early candidate for what we now call SF was "scientifiction," a term coined by Hugo Gernsback, an early SF editor and publisher for whom the Hugo Awards are now named. This term neatly overlaps the final syllable of "scientific" and the first of "fiction." However, although he preferred "scientifiction," Gernsback also coined the term "science fiction." The latter is what caught on with the public and was later shortened to "sci-fi."
You'd have to ask him why "science fiction" and not "scientific fiction." Unfortunately, he died in 1967. I assume it was because the doubled "fic" syllable was awkward to pronounce and made the speaker sound like he had a stutter. "Scientifiction" might have been an attempt to ameliorate that issue but it, too, is awkward, in my opinion. "Science fiction" does slide more easily off the tongue.
"Science fiction" is not ungrammatical. The earliest example of its use dates back to 1851, according to the Oxford English Dictionary. Google Ngram Viewer agrees with the OED, showing that "science fiction" is far more popular than "scientific fiction."
Also consider terms like "science book," "science fair," "science experiment"[1], "science teacher," and "Science Guy." These all objects, events, or positions relating to science but not (necessarily) applying scientific principles or methods.
Finally, as Peter Shor pointed out, many other genre names follow the same convention because the word before "fiction" often describes the content, not the style.
[1]: Of course, "scientific experiment" is also common.