Matrix models as hidden variables theories