Even though a scientific law and a theory might sound synonymous, there is noticeable difference between the functions they do. Science need both scientific theory and law because one cannot be an alternative for another.
Scientific law: It predicts the results of certain initial conditions like that of foretelling the plausible chances of the color of the hair of an unborn child. In other words a scientific law answers the question ‘what’ .
Theory : It works in such a way to provide the most logical explanation about why things happen as they do. For instance, a theory explains the scientific causes for the change in color of the hair of an unborn child like the changes in dominant and recessive gene. Also a theory would never grow up to a law. In simpler terms, a theory answers to the question ‘why’.
The scientist Johannes Kepler in the 17th century explained the nature of planetary orbits by theorizing the cosmic musical harmonies. In support of his theory, he made three laws in association with that. Kepler’s explanation was taken into account initially but later it was replaced.
Laws are subjected to change if it does not keep up with the data. On the other hand, theories compete with each other for acceptance. Even the scientists also support theories more than laws.
In some cases, some theories are new ideas with little experimental ideas which scientists ridicule. In other cases theories involving cold fusion, evolution, climate change etc. have gone through many years of experimental confirmation until gaining acceptance from the majority of scientists.
Scientific theories are not fixed or constant. New ways of thinking and experiments are always given importance. There is no guarantee that the present scientific theories would withstand the test of time. It is always viable to change.
A good scientific law is like a finely tuned machine doing its work perfectly whereas a good scientific theory is like a wounded fighter who even risks defeat in the face of failure.