It was most likely a gag, and nothing more.
That argument completely falls apart when you consider the fact that Gimmighoul putting Roy and the others under its spell started as a gag and yet that didn’t prevent it from returning and getting caught by Dot.
Likewise in its debut episode Characadet rode around on Terapagos but didn’t get caught then and yet that didn’t prevent it from returning and getting caught in by Liko.
So the argument that Sandy Shocks was just a gag and nothing more doesn’t really work.
Especially when you consider the fact that Sandy Shocks is literally the only wild Pokémon to start singing the song that is unique to Roy and his team.
Sure it’s not guaranteed to that Sandy Shocks is going to get caught by Roy.
However Sandy Shocks has a really decent chance of making it on to Roy’s team, and to try to argue that among the paradox mons that some how Pokémon the Pokémon that haven’t even shown up yet and have zero connection to Roy are more likely then Sandy Shocks which has more of a connection to Roy then them is absurd.
Well ash nearly wore one of them as a cap. And he wore passimians mask for the whole episode. Characters have bonded with pokemon so many times yet did not capture them.
Whether its chloe with Ponyta, or ash with countless of them including Latias in MPM even, or Max and Ralts and so on and on.
Like yeah, can Roy get sandy shocks? Sure. Is it gauranteed? No.
of course it’s not guaranteed that Roy is going to get Sandy Shocks, but it does have a relatively good chance of happening.
As for your argument that oh but we have had cases before we’re a Pokémon bonded with a character but didn’t get caught, that’s true but you know what also true, is the fact that we have also had cases where a wild Pokémon bonded with a character and did eventually get caught in a later episode.
Heck in Horizons alone we had Liko and Dot catch Characadet and Gimmighoul respectively outside of their debut episodes even though if you go off of their debut episodes they had less going for them hinting at their captures then Sandy Shocks.
So yeah, while not guaranteed Sandy Shocks chances of getting caught by Roy are actually pretty good.