When you program to the interface you usually inject that interface in other classes, when calling methods you then call the methods on the interface and not the actual implementation. Thus, when you want to switch the implementation it is as simple as replacing your @Bean method in your Configuration class with the new implementation.
Imagine you don't do this and want to change the implementation. You would need to find all occurences in your codebase and replace it with the new implementation.
Other advantages of coding to the interface include increased testability, since you can mock your dependencies, allows for the use of JDK dynamic proxy and increased cohesion between your classes.