Paddy has it right when he says it is for sound and heat insulation. More to the point, I think that the reason why it is on the engine compartment side of the firewall may have to do with ease of installation during the build process. The passenger compartment insulation in the footwell area consists of carpet and floormats and the padding underneath, plus side and under dash panels. The carpet and underpadding only goes up to about where the under dash panels attach. Anybody who has been up around the instruments, heater controls, and wiper mechanisms knows that there just isn't much space up in there. So, rather than insulating the firewall all the way up on the inside, it just probably made more sense to insulate the upper section of the firewall from about the point where the inside insulation leaves off, but on the engine side of the firewall.