Origin of the viewing-angle dependence of the optical continuum emission in quasars