I suspect it runs some type of benchmark or time demo sort of thing. In other cases settings can be determined by the hardware. In Doom 3, for example, 128 MB video cards will always yield medium texture quality. This is even if your system is capable of running more.
The important thing to remember is not to always trust the settings autodetect choose. So play with the settings yourself.