This question already has an answer here:
- How do airlines determine ticket prices? 9 answers
You can fly from Vienna (VIE) to Addis Ababa (ADD) for 526€.
However, flying from Vienna (VIE) to Cape Town (CPT) connecting through Addis Ababa (ADD) is only 419€.
So when flying to ADD, it is cheaper to book a flight to Cape Town and not take the connection than to book a flight directly to ADD.