In the answer below, I will only try to motivate why $\mathrm{Weyl}\times\mathrm{Diff}$ invariance is (thought to be) necessary in (bosonic) string theory. Consider a (classical) string in a $D$-dimensional spacetime with coordinates $X^\mu$ and metric $G_{\mu\nu}$. As the string moves it defines a two dimensional worldsheet surface $S$. Let $g$ denote the 2D metric **induced** on the surface from the spacetime metric $G$. The area of the surface measured wrt the metric $g$ serves as the ([Nambu-Goto](https://en.wikipedia.org/wiki/Nambu%E2%80%93Goto_action)) action of a classical string. Parametrizing the surface with some coordinates $\sigma_1,\sigma_2$ we can write the induced metric as $$g_{\alpha\beta}=\partial_{\alpha}X^\mu \partial_{\beta}X^{\nu}G_{\mu\nu}$$ and the Nambu-Goto action can be written as $$S_{NG}=-T\int d\mathcal{A} = -T\int d\sigma_1 d\sigma_2 \sqrt {-\det(g)}$$ To define this action we needed to choose coordinates (more precisely local coordinate charts) on the surface $S$. It is clear that the action ($\propto\int d\mathcal{A} =$ area of the surface) is independent of the choice of the coordinates $\sigma_1,\sigma_2$ on $S$. The choice of coordinates on $S$ only serves as an auxiliary tool for describing the action conveniently, rather than being a physical property of the surface. So if we quantize our string we would not want any physical observable in our quantum theory to depend upon the choice of coordinates. We could quantize the above action, but to avoid the strange square root we introduce a different version of the action (**they are [equivalent at the quantum level](https://physics.stackexchange.com/questions/268782/why-are-the-nambu-goto-action-and-polyakov-action-equivalent-at-quantum-level)**). This is done by introducing on $S$ an independent worldsheet metric $h$. [Do not confuse this with the induced metric](https://physics.stackexchange.com/questions/55463/polyakov-action-difference-induced-metric-and-dynamical-metric). We may choose any metric we like, as long as it has the correct Euclidean/Lorentzian signature. It is known that the [Polyakov action](https://en.wikipedia.org/wiki/Polyakov_action) $$S_P=-\frac{T}{2}\int d\sigma_1d\sigma_2\sqrt{-\det(h)} h^{\alpha\beta}\partial_{\alpha}X^\mu \partial_{\beta}X^{\nu}G_{\mu\nu}$$ defines the same classical theory as $S_{NG}$ except for one main difference. The classical theory defined by $S_{P}$ has additional variables corresponding to the three independent components of the (symmetric) metric $h$. However we know that the physical string itself has no such degrees of freedom, because we can describe its classical motion using the action $S_{NG}$ which depends only on $X^\mu$, and $G_{\mu\nu}$. Therefore if we want to get *the same* quantum theory of the string by quantizing the action $S_P$, then besides requiring that the physical observables in our quantum theory don't have any dependence on choice of coordinates, we must also require that they don't depend on choice of metric $h$. In particular there should not be any physical observables corresponding to the metric degrees of freedom $h_{11},h_{12}=h_{21},h_{22}$ and so we should somehow be able to get rid of them. To get rid of three continuous degrees of freedom we need three continuous symmetries of the action. Diffeomorphism invariance allows us to change the two worldsheet coordinates arbitrarily and hence effectively gives us with two continuous symmetries. We need one more continuous symmetry of the action which is given by the Weyl invariance. In two dimensions it is known that using diffeomorphism and Weyl transformations any metric can be (locally) turned into a flat metric (this follows from the fact that one can always find local [isothermal coordinates](http://en.wikipedia.org/wiki/Isothermal_coordinates) on 2D surfaces). So in the classical theory defined by $S_P$, we can gauge away the metric $h$ completely, by gauging the continuous symmetries of Weyl and diffeomorphism invariance\*. Thus the (Euclidean) partition function of the bosonic string is defined $$Z\equiv \int \frac{[dX dh]}{V_{\mathrm{Weyl}\times \mathrm{Diff}}} \exp(-S_P[X,h])$$ If we make sure that quantization process preserves these gauge symmetries $\mathrm{Weyl}\times\mathrm{Diff}$, then in the quantum theory too they can be used to gauge away the worldsheet metric degrees of freedom. ***** \* If you do not gauge $\mathrm{Weyl}$, the theory is still consistent: you obtain the linear dilaton CFT. Though exotic, it is still useful: see Polchinski I, $\S$3.4, or [this question](https://physics.stackexchange.com/questions/6792/is-weyl-invariance-absolutely-necessary-for-string-worldsheets?rq=1).