What does curl do in triggering a reverse shell in Oopsie

But why should the file be executed? Isn’t it supposed to be something like an image? Why should the server run it?