As Allah has given men a choice to have 4 wives at a time so does that mean Prophet Muhammad (saw) disobeyed Allah because He (saw) had 11?
Prophet Muhammad SAWW and any other Prophet (peace be upon them) never disobeyed ALLAH azawajal. Disobedience is when you go against someone's specific orders.
Some Prophets ( peace be upon them) did make minor mistakes but they were in no way disobedience (I am saying this because maybe they are the reason you thought Prophets could disobey the CREATOR.)
Those mistakes, for example, when Prophet Yunus (peace be upon him) left His people before the Order from the CREATOR came. Prophets (peace be upon them) can never disobey the Creator, there is no evidence otherwise.
Now back to first part of the question:
Polygamy was allowed initially without any limit on how many wives one could keep.
Islam actually limited it to 4 wives, when verse 4:3 of the Qur'an was revealed, including the part: "marry those that please you of [other] women, two or three or four." Exact dates are difficult, but scholars put this revelation at 3-5 years after the migration to Madinah
At the time, he was married to more than 4 wives. Those whom he was already married to remained married to him, but he did not engage in any further marriages after that time.
The Prophet (pbuh) was allowed to keep all his previous wives because no one was allowed to marry the Prophet’s wives (ra) after they were divorced or widowed as they were UMMUL-MOMINEEN (MOTHER OF THE BELIEVERS).
In Surah Ahzab chapter 33 verse 52:
"It is not lawful for thee (to marry more) women after this, nor to change them for (other) wives, even though their beauty attract thee, except any thy right hand should possess (as hand maidens) and Allah doth watch over all things ". [Al-Qur’an 33:52]
Also there are certain things specific for the Prophet saww only.
Your friend (Muhammad) was not astray, nor was he deceived. Nor was he speaking out of a personal desire. It was divine inspiration. Dictated by the Most Powerful. (The Holy Quran Al-Najm 53:2-5)
E.g. Tahajudd (Night Salah) was obligatory upon the Prophet SAWW while voluntary for the Ummah.
And during a part of the night, pray Tahajjud beyond what is incumbent on you; maybe your Lord will raise you to a position of great glory. (The Holy Quran Al-Isra 17:79)
According to Quran you can have up 4 official wife (life time marriage) [just in case of justice between them and you need the your first wife permission to do other marriages] and unlimited short marriage (sigheh)
Why Muhammad had 11 wives?
Because some of them was due to politics for example a girl was the daughter of the king of some country and in that country only when peace happens if the king of other country marry their daughter.
Or for example some women who their husband died in wars and needed to be supported by a man in these case a man can sigheh (marriage with time limit for example for 1 year) women then give her Mahr and life support this have 2 affects:
- bad men won't abuse that woman because they know she has a husband.
- the poor woman don't need to do Zinah for her sexual needs or as for making money food dress
and consider after wars lots of men dies how human begin should be populated with lots of women and lack of men?? How future soldiers should be born?