Why is it "materials science" instead of "material science"?
It's materials science because material is also an adjective. The phrase material science, as opposed to, say, spiritual science, was used before people started studying the science of materials. Consider this Ngram:
If you search in Google Books for "material science" before 1910, you get hits like
What does material science know about things of the soul?
The world of spirit outside material science.
Material science takes up the objects of the world and interprets them.
Presumably, the science of materials was named materials science to avoid confusion with this phrase.
The singular form material means the matter from which a thing is or can be made. In the phrase materials science there are different elements involved, which can all be studied separately due to their different properties.
On the other hand, in your other example, computer science doesn't require plural as the computer is a specific type of machine despite its many versions and various models.
The problem with the word material is that it is also an adjective. I suspect that material scientists didn't like being contrasted with immaterial scientists, so they added an s to material.
One occasionally sees the term "material science." But most people say "materials science" because it is the science of materials, not just some particular material.