It's return a bean than was instatinated with constructor (new MyServiceImpl()) - so it's not "anonymous object" but named bean in spring.
That bean stored in spring context for later user by same name or class.
anonymous object - it's a different entity. I think here you refer something like mymethod(new InterfaceName { ...implementation ... })
In other word you compare apples and oranges.
To make it annonymus your notation should looks like:
@Bean public MyService myService() { return new MyServiceInterface() { .... do something ... }; }