The passage below is taken from Consciousness Explained by
Daniel C.Dennett.
..an organism must either armor itself ( like a tree
or a clam ) and "hope for the best," or else develop
methods of getting out of harm's way and into the
better neighborhoods in its vicinity. If you follow
this latter course, you are confronted with the
primordial problem that every agent must continually
solve:
Now what do I do?
In order to solve this problem, you need a nervous
system, to control your activities in time and space.
The juvenile sea squirt wanders through the sea
searching for a suitable rock or hunk of coral to
cling to and make its home for life. For this task,
it has a rudimentary nervous system. When it finds
its spot and takes root, it doesn't need its brain
anymore, so it eats it! ( It's rather like getting
tenure.)