It's because the game would run on the server, not on your machine.
The way OnlineGDB works is that you write some code on your browser, that's sent to the server. It's compiled and run there and the standard output (characters) is sent back to your browser.
You have to install Python on your own machine to make it work.