The Shanks part was supposed to happen last year, but as usual Oda messed up his pacing, so I think he just decided to have him come to Wano so he can accomplish both story development and advertisement
In my head canon his original plan was to just show the situations around the world in usual op style, and Shanks would be one of them, maybe already dealt with Barto and we get the “it’s time to go for one piece” scene