As for the in-universe motivations for Shanks to be there, I doubt we were given any but can be easily inferred, from him being the overzealous balance-obsessed centrist he is worrying about the Big mom- Kaido alliance, to the precious Pirate Prince of destiny he personally groomed being there.
As to what was achieved, let's see:
Kind of belittled Momo and the Scabbard's corageous stand against hopeless odds;
Definetly ridiculed the newest admiral, further cementing that the Marines don't matter any more in the process;
Took away precious space that could have allowed some years-old plot threads and charachter arcs to have a proper on-screen conclusion, which they ended up not having or being thrown away;
New boobs for Shinobu, but not for Raizo;
Cringe DeviantArt OC barbie doll from new movie implied canon;
Not too great if you ask me.
Even not considering the Shanks of it all, everything about Greenbull felt completely random. He randomly went alone against at least 15 billion worth of pirates, he randomly engaged the nation's leader, randomly shouting empty threats while exposing his foreign politics manifesto. He finally randomly skedaddled away when felt that one more famous pirate was nearby.
It all felt really forced and contrived.