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.
The following details:
The mahAbhArata records this as follows –
mahAdEva: sarvamEdhEMahAthmAhuthvaa aathmAnam dEvadEvO BhabhUva visvAn lOkAn vyApya vishtabhya keerthyA virAjathE dhyuthimAn KrutthivAsa: --MahAbhAratha: Shanthi Parva 20.12
(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:
taMdR^iShTvA ghora saN^kAshaM prAdurbhUtaM mahAviSham.h | dhyAtvA nArAyaNaM devaM hR^idaye garuDadhvajam.h || (~BrahmAndapurANa)
(Meaning): Seeing that terrible poison emerging, (Shiva) meditated on the Lord Vishnu, Garudadhvaja, residing in his heart.
In Garuda Purana, Shiva tells Parvati:
aprakAshamidaM devi guhyAd guhyataraM padam.h | purAham abdhimathane patagendra viShAvaham.h | avadhyaM garalaM ghoramaJNbhujam amR^itaMyathA ||
(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)
This one is well known in the mantra-shAstras:
achyutAnanta govinda mantrato.apsushubhaM param.h | OM iti sampuTIkR^ity ajapan viShadharo.aharat.h ||
(Meaning): Lord Shiva did 'abhimantraNa' of the poison with the most auspicious mantra: OM achyutAnantagovinda OM' and then consumed the poison.
nAmatraya prabhAvAchcha viShNossarvagatasyavai |viShaM tadabhavajjIrNaM lokasamhArakAraNam.h |
(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.