I'll give an easy to understand example. Lets say you have some json
{"a":[1,2],"sz":"text", "v":3, "f":1.2}
Now lets say programmatically you want to list the name, type and value. Instead of having a switch() for each type (array for a, string for sz, etc) you can just have a base type and call a function which does its job. It is also more cpu efficient than using a switch with a dozen types.
Then there are plugins, libs and foreign code with interface reasons.