Indeed, there is a huge difference between a scientific theory, which has a formal definition and precise meaning. A scientific theory, e.g. evolution or the 'Big Bang' (not a good descriptor, but it's stuck...), is the best current understanding of how something 'works'. It is tested by evidence and by verifying predictions that the theory makes.Indeed.
That word has evolved - in English - and wrapped itself in connotations so that it's use in non-sciences doesn't work or sets up expectations that are (no longer?) fulfilled. So people go "pha! Theory! That doesn't work in music!" - and quite right; not because music "theory" is no good but the meaning of theory has shifted
I'd'v thought Music Analysis would work, but, go on, what might be a better word?
That does mean that if evidence does not support the theory, or a prediction does not happen, then the theory needs further work. The theory wasn't wrong, but better data means it needs refinement. For example, Newton's laws of motion and theory of gravity works extremely well in any ordinary everyday experience. You can do things like work out where the planets are in the sky... but better measurements showed that there was a problem predicting Mercury's position in the sky and Newton wasn't cutting it. Along comes Einstein and Relativity and the intense gravitational field close to the sun introduces differences which Newton could not predict but Einstein could (and did).
The general public's use of the word 'theory' is no more rigorous than 'I have an idea', which is not the same thing as a scientific theory.
In music, 'theory' is short-hand for all the technical aspects of describing music and how it works, including notation and musical analysis.