How Devraj Indra became the king of all Devas? I mean how and why he was chosen as the king?
How Indra became king of Gods?
Actually Indra is not the name of any one person rather it’s a post of King of heaven and king of demi gods.
On performing some sacrifices number of times or penances , any man can go to heaven and can obtain position of the king of heaven Or king of gods. For e.g. doing Hundred Ashwamedha Yajnas one can attain the post of Indra. He will retain the post of Indra until another person does more Or Same Yajnas than previous Indra and becomes eligible for this position.
This is described in Mahabharata, Santi Parva, Section -20
यज्ञाय सृष्टानि धनानि धात्रा; यष्टादिष्टः पुरुषॊ रक्षिता च
तस्मात सर्वं यज्ञ एवॊपयॊज्यं; धनं ततॊ ऽनन्तर एव कामः
यज्ञैर इन्द्रॊ विविधैर अन्नवद्भिर; देवान सर्वान अभ्ययान महौजाः
तेनेन्द्रत्वं पराप्य विभ्राजते ऽसौ; तस्माद यज्ञे सर्वम एवॊपयॊज्यम
महादेवः सर्वमेधे महात्मा; हुत्वात्मानं देवदेवॊ विभूतः
विश्वाँल लॊकान वयाप्य विष्टभ्य कीर्त्या; विरॊचते दयुतिमान कृत्ति वासाः
आविक्षितः पार्थिवॊ वै मरुत्तः; सवृद्ध्या मर्त्यॊ यॊ ऽयजद देवराजम
यज्ञे यस्य शरीः सवयं संनिविष्टा; यस्मिन भाण्डं काञ्चनं सर्वम आसीत
हरिश्चन्द्रः पार्थिवेन्द्रः शरुतस ते; यज्ञैर इष्ट्वा पुण्यकृद वीतशॊकः
ऋद्ध्या शक्रं यॊ ऽजयन मानुषः संस; तस्माद यज्ञे सर्वम एवॊपयॊज्यम
yajñāya sṛṣṭāni dhanāni dhātrā; yaṣṭādiṣṭaḥ puruṣo rakṣitā ca
tasmāt sarvaṃ yajña evopayojyaṃ; dhanaṃ tato 'nantara eva kāmaḥ
yajñair indro vividhair annavadbhir; devān sarvān abhyayān mahaujāḥ
tenendratvaṃ prāpya vibhrājate 'sau; tasmād yajñe sarvam evopayojyam
mahādevaḥ sarvamedhe mahātmā; hutvātmānaṃ devadevo vibhūtaḥ
viśvāṁl lokān vyāpya viṣṭabhya kīrtyā; virocate dyutimān kṛtti vāsāḥ
āvikṣitaḥ pārthivo vai maruttaḥ; svṛddhyā martyo yo 'yajad devarājam
yajñe yasya śrīḥ svayaṃ saṃniviṣṭā; yasmin bhāṇḍaṃ kāñcanaṃ sarvam āsīt
hariścandraḥ pārthivendraḥ śrutas te; yajñair iṣṭvā puṇyakṛd vītaśokaḥ
ṛddhyā śakraṃ yo 'jayan mānuṣaḥ saṃs; tasmād yajñe sarvam evopayojyam
The exercise of the duty of charity after discriminating the deserving from the undeserving is not easy. The Supreme Ordainer created wealth for sacrifice, and He created man also for taking care of that wealth and for performing sacrifice. For this reason the whole of one's wealth should be applied to sacrifice. Pleasure would follow from it as a natural consequence. Possessed of abundant energy, Indra, by the performance of diverse sacrifices with profuse gifts of valuables, surpassed all the gods. Having got their chiefship by that means, he shineth in heaven. Therefore, everything should be applied to sacrifices.
This is also described in Shreemad Bhagavt Purana
अथादीक्षत राजा तु हयमेधशतेन स : |
ब्रह्मावर्तो मनो: क्षेत्रे यत्र प्राची सरस्वती ||1||
athādīkṣata rājā tu hayamedha-śatena saḥ
brahmāvarte manoḥ kṣetre yatra prācī sarasvatī
The great sage Maitreya continued: My dear Vidura, King Pṛthu initiated the performance of one hundred horse sacrifices at the spot where the river Sarasvatī flows towards the east. This piece of land is known as Brahmāvarta, and it was controlled by Svāyambhuva Manu.SB 4.19.1
तदभिप्रेत्य भगवान् कर्मातिशयमात्मन:|
शतक्रतुर्न ममृषे पृथोर्यज्ञमहोत्सवम् ||2||
tad abhipretya bhagavān karmātiśayam ātmanaḥ
śata-kratur na mamṛṣe pṛthor yajña-mahotsavam
When the most powerful Indra, the King of heaven, saw this, he considered the fact that King Pṛthu was going to exceed him in fruitive activities. Thus Indra could not tolerate the great sacrificial ceremonies performed by King Pṛthu.SB 4.19.2
Purport: This envy is also found in the personality of the King of heaven, Indra. As evident from revealed scriptures, Indra was several times envious of many persons. He was especially envious of great fruitive activities and the execution of yoga practices, or siddhis. Indeed, he could not tolerate them, and he desired to break them up. He was envious due to fear that those who performed great sacrifices for the execution of mystic yoga might occupy his seat.
The Kena Upanishad – Kahanda -4 - Verse 28 , tells us why Indra became superior to all the gods. By knowing Brahman first. Here is the brief story-
The Brahman won a victory for the Devas and in that victory of the Brahman the Devas attained glory. They thought ‘the victory is ours and this glory is ours alone.’ He knew this notion of theirs and appeared before them. What that Great Spirit was they did not know. The devas addressed the Fire thus “O Jataveda! Find out what this Great Spirit is. - Then That Brahman placed a straw before him and said: ‘Burn this , but Agni (Jataveda!) was not able to burn it. Then the devas said Vayu: “Learn O Vayu! what this Great Spirit is” – Brahman That placed a straw before him and said “Blow it away , but vayu but was not able to blow it. But afterwards Indra approached Brahman and he disappeared , then Indra saw Uma (Parvati) and he asked about him to her , then Uma said to Indra -“It is Brahman indeed. Attain glory in the victory of Brahman.” From her words only, he learned that it was Brahman.” Therefore also does Indra considerably excel other Devas.
तस्माद्वा इन्द्रोऽतितरामिवान्यान्देवान्स ह्येनन्नेदिष्ठं पस्पर्श स ह्येनत्प्रथमो विदाञ्चकार ब्रह्मेति ॥ २८ ॥
tasmādvā indro'titarāmivānyāndevānsa hyenannediṣṭhaṃ pasparśa sa hyenatprathamo vidāñcakāra brahmeti || 28 ||
- Therefore also does Indra considerably excel other Devas because he approached Brahman nearest and because he first knew the Spirit to be Brahman.