Returning to the OP's question, I think it worthwhile point out that this "desire to survive" is one aspect of a perennial idea of philosophy -- beginning with the Stoics and continuing to present-day systems theory -- namely that of conatus, an idea of which Belinda has often commented on with respect to Spinoza.
Additional related current scientific theories include the ideas of autonomous self-organization and autopoiesis -- an application from systems theory to living systems.
But these answers, from a philosophical point of view, just like many of the other answers in this thread, are really tautologous. It's like saying lifeforms have a desire to survive because inherently they have the power to persist, to strive, of a will to live, and so forth -- just like the statement in Molière's play Le Malade Imaginaire that opium is soporific because of its dormative power. But the "why" of the question can not be answered with any real insight unless this power is explained in different terms.