For a greater understanding of what the Bab's intentions were when nominating Subh-i Azal (Mirza Yahya) , you can look at several sources, such as The Covenant of Baha'u'llah, by Adib Taherzadeh:



The appointment by the Báb of Mirza Yahya as the leader of the Bábí community took place on the advice of Bahá'u'lláh. 'Abdu'l-Bahá states that some time after the death of Muhammad Shah it became evident that Bahá'u'lláh's fame had spread far and wide in Persia and it was essential to divert public attention away from His Person. To achieve this aim Bahá'u'lláh advised the Báb to nominate Mirza Yahya. This advice was communicated through the medium of a trusted believer, Mulla Abdu'l-Karim of Qazvin, otherwise known as Mirza Ahmad, who was able to make contact with the Báb. The appointment of Mirza Yahya, who was then in his late teens, had the obvious advantage of enabling Bahá'u'lláh to direct the affairs of the community behind the scenes through the instrumentality of Mirza Yahya, who, in reality, was merely the ostensible head until the advent of 'Him Whom God shall make manifest'.



The Bábí community was not informed of the reasons behind this appointment. It must have come as a surprise to many when they realized that the appointee of the Báb was a youth in his teens, and those who knew his personality were aware of his shallowness and vanity. Apart from Mulla Abdu'l-Karim, the only other person who was privy to this secret arrangement was Bahá'u'lláh's faithful brother, Mirza Musa, entitled Aqay-i-Kalim. It must be stated here that the Báb in all His Writings urged the believers to be ready for the manifestation of 'Him Whom God shall make manifest' and no one else. So emphatic was His advent and so close was the timing of His Revelation that the Báb never contemplated the appointment of a successor to Himself. Indeed, He confirms this in the Bayan, saying that in His Dispensation there was to be no mention of successorship. Yet Mirza Yahya, as we shall see later, broke the Covenant of the Báb and claimed to be His successor.



(Adib Taherzadeh, The Covenant of Baha'u'llah, p. 60)



Note that in the Bab's Will and Testament document linked above, Verse 27 it clearly says "We order you to obey Him Whom God Shall Make Manifest. " By stating this, the Bab makes it clear that Azal himself is not Him Whom God Shall Make Manifest. Yet that is what he later claimed, in violation of the Bab's Covenant.