Ideology is what people turn to, when searching for meaning.
This phenomenon can be observed when looking at an example like Humanism. The death of christianity lead to a vast increase in meaninglessness. People felt like christianity wasn‘t able to fulfill their need for meaning anymore, so they looked for something new. Humanism was what they were looking for: they found meaning in its different interpretations, such as socialism or liberalism.
For one ideology to rise, another must fall.
This is a fundamental rule society functions by. We shouldn‘t forget though, that the rise of another ideology is not optional. A lack of meaning is — for whole societies and cultures — extremely unstable and can not persist for long.
Currently it seems that humanism is quite stable. There are conflicts, sure, but they consist within the humanistic framework. Most wars are fought between liberalism and socialism, not between humanism and islam (that is at least in our western world, which as it seems is also the future of all other cultures on our planet).
Ideologies are usually unstable at first. However as they spread more and more, they tend to get extremely stable. Looking at christianity we can see that even though it caused (or at least allowed) many societal problems, it could easily persist for thousands of years.
For a society to change their ideology there needs to be pressure. Small conflicts (e.g. wars, expropriation, injustice, etc.) can then act as a capacitor for the change to occur.