Topology has many occurences in physics like topological insulators, topological quantum computing etc. But what is confusing me is that topology is this mathematical theory that studies the behaviour of spaces using transformations that are invariant under local perturbations. At least that is how I see it I'm not an expert in topology. It seems to me that physics only adapted the 'invariant under local perturbations' part and uses this to define topological invariants. So is this really related to topology or did we just steal the name? Can we use the machinery of topology for these topological invariants? Can topology help find these topological invariants?