Example of endofunctor in Cat that is not a 2-functor. Is there a good example of an endofunctor $\def\Cat{\operatorname{Cat}}\Cat \to \Cat$ (seeing $\Cat$ just as category) that is not a 2-functor?
 A: Let $\operatorname{ob} \mathcal{C}$ be the set of underlying objects in a (small) category $\mathcal{C}$, considered as a (small) discrete category. It is clear that we get an endofunctor $\operatorname{ob} : \mathbf{Cat} \to \mathbf{Cat}$, and it is also clear that it fails to preserve equivalences of categories, so it cannot be a 2-functor.
Alternatively, let $\tau_0 \mathcal{C}$ be the set of isomorphism classes of objects in a (small) category $\mathcal{C}$, considered as a (small) discrete category. Again, it is clear that we get an endofunctor $\tau_0 : \mathbf{Cat} \to \mathbf{Cat}$, and this time it even preserves equivalences of categories. But it is still not a 2-functor: there is a non-trivial natural transformation between the two possible functors $\mathbb{1} \to \mathbb{2}$, but there is no natural transformation between the corresponding functors $\tau_0 \mathbb{1} \to \tau_0 \mathbb{2}$. (Alternatively, we could note that $\tau_0$ fails to preserve adjunctions.)
Amusingly, if we define $\pi_0 \mathcal{C}$ to be the set of connected components of $\mathcal{C}$, then $\pi_0 : \mathbf{Cat} \to \mathbf{Cat}$ admits the structure of a 2-functor in a unique way.
A: Free cartesian closed category on a category.  If you only consider categories enriched in groupoids rather than 2-categories, then it's a groupoid-enriched functor, but it's not a 2-functor on Cat.
