Exactly right. Evolution doesn't have to result in smarter or better. The result is the organism, through generations, gets better at living in its' environment. An organism can evolve to become so niche and adapted to its specialized environment that if the environment changes, it will die. There is also sexual selection for mating (think peacock) which can result in a diminished ability to escape predators.