Adding a WMS layer without specifying the image type forces the image type to 'image/jpeg', 'image/png' or 'image/gif' depending on whether or not the layer should be transparent and whether or not the browser can render transparent PNGs. This makes it necessary to explicitly override the format when communicating with any WMS server that does not support all three of the above formats, since OpenLayers can ask the server to render in any of them.
It would be better to set the default format to an empty string or something like "auto" and replace that string on first use with the format that is known to be supported by the server, asking the server for the list of supported formats via the GetCapabilities request.