Though you were using those fancy categorical terms in your question and should be completely satisfied with the existing answers, here is an attempt for a rather trivial explanation:
Suppose there would be a function return
(or pure
or unit
or ...
) in the Functor type class.
Now try to define some common instances of Functor: []
(Lists), Maybe
, ((,) a)
(Tuples with a left component)
Easy enough, eh?
Here are the ordinary Functor instances:
instance Functor [] where
fmap f (x : xs) = f x : fmap xs
fmap _ [] = []
instance Functor Maybe where
fmap f (Just x) = Just (f x)
fmap _ Nothing = Nothing
instance Functor ((,) a) where
fmap f (x, y) = (x, f y)
What about return
for Functor now?
Lists:
instance Functor [] where
return x = [x]
Alright. What about Maybe?
instance Functor Maybe where
return x = Just x
Okay. Now Tuples:
instance Functor ((,) a) where
return x = (??? , x)
You see, it is unknown which value should be filled into the left component of that tuple. The instance declaration says it has a type a
but we do not know a value from that type. Maybe the type a is the Unit
type with only one value. But if its Bool
, should we take True
or False
? If it is Either Int Bool
should we take Left 0
or Right False
or Left 1
?
So you see, if you had a return
on Functors, you could not define a lot of valid functor instances in general (You would need to impose a constraint of something like a FunctorEmpty type class).
If you look at the documentation for Functor
and Monad
you will see that there are indeed instances for Functor ((,) a)
but not for Monad ((,) a)
. This is because you just can't define return
for that thing.