The question is not as bad as stated in some comments.
It is not the same as asking: Why having many prophets when one could have been enough.
Because most prophets were sent to only a people living in one region, not to the whole mankind. Prophet Moses/Musa (a.) and Jesus/Isa (a.) were sent to the bani Israel. The Thamud got prophet Salih (a.) and the 'Ad had prophet Hud (a.).
Some prophets where even sent to only the people of one certain city. So a prophet can be a local leader, but is not necessarily the prophet of the whole mankind.
But the Imam (a.) is. With the event of Ghadir Khum the time of Imamat started and is lasting until now. Imam Ali was announced the first Imam, but why did he had to die and then 11 Imams come, one after another got killed except the last Imam who is still alive...?
There are a few important aspects and wisdom in having twelve imams.
In Shia Islam, we believe that all twelve Imams were "ma'sum". Not only that they are infallible, also that they would took action in a perfect manner.
Every single one of them, if he is in the same situation as another imam, would have acted the same way as the other Imam.
If Imam Hassan (a.) were in the exactly same situation as Imam Hussain (a.), he would have been ready to stand up, fight and sacrifice himself and his family, the same way Imam Hussain (a.) did in Karbala. Likewise, if Yazid had not tried to force Imam Hussain (a.) to give him loyalty oath, and if the pure islam of Muhammad (s.) could have been preserved without his sacrifice, then he would not stand up and get killed in Karbala on the day of Ashura.
Now we are muslims in the time of Imam Mahdis Ghaiba, he is not with us. We can't go and ask him about the religion. We can't ask him who the muslims enemy is today. So we have to learn from how the acted in different situations.
It is wrong to think that the muslim ummah is always in the same situation as Imam Ali (a.). He had to be silent and patient in order to protect the pure Islam. Sometimes we are in a situation like Imam Husain (a.) and have to stand up and raise our voice, while silence could be destructive.
We have to learn from the history, historical events and get the teachings out of the way the imams acted in different eras and different situations.
That's why it is important for us to learn the lives of the imams.
For example: Imam Hassan had to agree with a peace treaty with Muawiya. Why did he did that? Why did he not fight and get killed like his younger brother Imam Hussain? There is wisdom in this and we have to learn from these events.
Then what did Imam Hussain did, and when and why? When is the muslims duty to fight and when not?
Then take Imam Sadiq (a.), the sixth imam. He was not as oppressed as the imams before or after him, because in his time the Bani Abbas fought against the ruling Bani Umayya. So how did he took advantage of this situation? Again we have to learn from this: He build hundreds of schools and taught the people religion, science and so on.
And of course:
If there were only one Imam, we had not as much Ahadith, traditions. The less traditions we have, the more disagreements there are between the muslims. If the sunni muslims had the ahadith of the Imams as sources for religious rules, there would be no difference between us.
And the last aspect I want to mention:
Imam Mahdis occultation (Ghaiba) was not from one day to another. The muslims were slowly got prepared for this era. That started with the live of the 7th imam.
The 7th Imam, Imam Musa Kazim (a.) was imprisoned for most of his Imamat time and the muslims had less chance to see him. The 8th Imam, Imam Ali Riza (a.), lived in a city far away from medina or kufa, were the other imams used to live. So again it was not possible to reach him for most of his followers. The other imams after him were most time in jail or under arrest. The 11th Imam had to live on a military base and could not get visited but from only a few of his followers. They poisoned him when he was only 25 years old. Most of his followers had no idea that he even has a son.
Then his son, the 12th imam, went into ghaiba, but first into the minor ghaiba. For 4 generations there was still one person who had contact with him. After these 4 "sufara", the major ghaiba began and lasts until now.
So Allah (swt) prepared the muslim ummah to learn to handle with an imam in ghaiba. That is another reason why we had more than one imam.
And finally the answer people want to here: 12 is a magic number mentioned in Quran and in the bible. I guess it is not so wrong... but also not so important.
And one could argue that the 12 is mentioned in quran and torah and gospel BECAUSE of the 12 imams after the last prophet (s.). But I am honestly not interested in number games.