Why didn’t Lord Vishnu himself consume the poison during the churning of the ocean and allowed Shiva to do it?
The answer to this is because Shiva, had performed severe austerities to attain the position of the lord of the Devas and by virtue of the merits accrued due to severe penances Shiva was utilized as vessel by Lord Vishnu to consume poison.
Many of these details are from the this blog and also from Padma Purana.
Please check the above link for more details on this episode.
(Meaning): The noble soul known as “mahAdeva” (shiva) performed the sarvamEdha yAga , where He offered Himself as Havis and became the greatest among DevAs. He shines brilliantly in all the worlds with His jnAna, took on eight kinds of radiant forms (ashtamUrthy) and became renowned (keerthimAn ,DhyutimAn virAjathE).
Since Shiva had acquired merit, the gracious bhagavAn Vishnu fulfilled the fruits of his penances by allowing him to swallow the poison and thus lead the Devas as their head.
However, it should be understood that Shiva was a vibhUti and the actual act of containing the poison was done by Lord Vishnu only through the medium of Shiva. This is stated by Shiva himself in the following pramAnAs, which serve as upabrahmaNas for the keSi sUkta:
(Meaning): O Devi, this is not a well known fact. At the time of samudra-mathana, before consuming poison, I meditated on the Lord. (It is due to his mercy that ) I was able to drink it as easily as I had the nectar (amR^ita)
(Meaning): Due to the chanting of the 'nAmatraya' (three names) of that all-pervading Vishnu, that terrible poison, which could have destroyed the worlds, was digested ('jIrNam.h').
In Padma Purana, Uttara Khanda , Section 6; Chapter 232, Shiva says the following regarding the churning of the ocean and halahala or poison episode.
Then at that time when the great ocean was being churned, at first there came up the very strong Kalakuta poison which was very painful, very fierce, and which was like the fire of universal
destruction. [Verses 7-10]
Seeing (it), all gods and demons, being frightened,fled away. O you of beautiful eyes, then seeing the best gods frightened and fleeing away, I (Shiva) said to them: "O you all hosts of gods, do not be afraid of the poison. I shall drink this strongpoison, Kalakuta." Thus addressed by me, all the gods, led by Indra and bowing, very much praised me with the words 'Well, Well'. On seeing the strong poison, like a cloud, having come up I (Shiva) meditated in my heart upon the eagle-bannered god Vishnu, resembling the rising sun and holding a conch, a disc, and a mace.[Verses 11-15]
Having meditated (i.e. when Shiva meditated) with a concentrated mind upon that lord along with Sri and Bhumi, having earrings of gold purified by fire, remover of all miseries, and on my having muttered the great hymn of the name and form (of Vishnu) along with MahalaksmI, all that poison, which was very fierce, which was the first one, which was fearful to all, which was (capable of) destroying all the worlds, was digested (by me i.e Shiva) due to the three names of Vishnu, the omnipresent one. He who,being restrained, would devoutly mutter the three names of Visnu, viz. Acyuta, Ananta, Govinda, beginning with Pranava (i.e. Om) and (also) ending with Om, has no fear of death, so also the great fear due to poison, disease and fire. The wise, restrained one, who would mutter the great hymn—the three names—does not have fear of Death; then from where else (can he have it)? Thus with (the muttering of) the three names(of Vishnu) I (Shiva) drank that poison. [Verses 16-21]
So, all these clearly, indicate that Shiva was able to consume the poison only due Lord Vishnu's grace i.e. it was Lord Vishnu as the inner self of Shiva made it possible for Shiva.
These type of questions can't be answered in absolute perspective:
One can generate infinite number of questions regarding why some xyz deity did only a particular role in particular abc story ?
Even though let's try to answer this question relatively.
Shaivites may say that even Lord Vishnu wasn't able to consume poison so it was necessary for Lord Shankara to consume it. Vaishnavs may claim that Shiva was able to consume poison only due to grace of Lord Vishnu.
However let's look this story from Vedic Perspective.
Vedic Samhitas (Taittariya and Vajasena) samhita describes Lord Rudra as Nilagriva in various places. For eg. In Taittariya Samhita 4.5.1:
Namo Astu Nilagrivaya Sahasrakshya
Salutations to the blue-necked one and to the one having 1000 eyes (ie. All seeing)
Nilagriva means blue necked one.
As Vedic Samhitas are eternal, so it becomes necessary that some events make the neck of Lord Rudra blue.
So, to respect the Vedic statements Lord Shankara consumed the poison and made his neck blue thus being Nilakantha/Nilagriva. So, Lord Vishnu didn't drank because it was just like pre-ordained event at that time.
In Response to @Krishnas answer Rudra being Mahadeva, Devadeva etc.. only after performing Sarvamedha Yajna.
The context of the verse should only be taken in relative perspective because it contradicts with Shruti passages if taken in absolute perspective.
This chapter of Satapatha Brahmana of YajurVeda clearly gives story of birth of Lord Rudra from Brahma. Brahma just after the birth itself clearly states:
You are Mahadeva.
You are Ishana.
So, in the above chapter of Ashtamurti Manifestation of Rudras he is Mahadeva(the great God), Ishana(the Ruler) from his birth. So, there is no meaning of saying he became only after performing Yajnas.
It also contradicts Shruti passage of Taittariya Aranyaka[10.21] which calls Lord Shiva as:
Ishwara SarvaBhutanam Lord of All Time.
As he is Ishwara of SarvaBhuta (All time) so there is no meaning of saying he became only after doing something.
So, it becomes clear that Mahabharat passage is actually stating Mahadeva is the soul of Gods, as it says "Hutwatatmaanam" ie. Giving self as oblation and then being God of Gods. ie. That Mahabharata passage is actually explaining the Shruti passage of Svestasvatara Upanishad like:
He, the omniscient Rudra, the creator of the gods and the bestower of their powers, the support of the universe, He who, in the beginning, gave birth to Hiranyagarbha−may He endow us with clear intellect! [3.4]
So, it is actually explaining How Lord Shiva created Gods, became self of them by giving oblation of his own self. As the Puranas state "This whole world is the transmutation of Yajna." So that verse is actually explaining how the oblation of self of Mahadeva became self of Gods ie. Devadeva or God of Gods.
Like any library, Hinduism Stack Exchange shares great information, but does not offer personalized advice, and does not take the place of seeking such advice from any Acharya, Pundit, astrologer, Guru or other trustworthy Counselor.