Water doesn't catch fire because it can't burn anymore. Burning in our atmosphere is a reaction with oxygen, and in water hydrogen and oxygen have already burned. You can't burn twice. The reason water extinguishes flames is because it is exceptionally good at absorbing heat.