How would cairo know what you consider the background?
The documentation that you link to mentions that the alpha channels and all color channels are set to 0. This is fully transparent black.
The example in the documentation is an image with an alpha channel and thus the cleared parts become transparent.
You are using an image without an alpha channel and thus the cleared parts become black.