Since Muhammad claimed that his new religion was a continuation of the God of the Jews and Christians, he initially performed the Qibla change in Mecca and commanded his followers to pray facing Bait al-Maqdis (Arabic: بيت المقدس‎) in Jerusalem, instead of the Kaaba. Upon reaching Medina, Muhammad further adopted many Jewish laws to please the Jews. However, he soon faced complete failure, as the Jews did not accept his claim of prophethood and instead labeled him a false prophet.

Thus began the enmity with the Jews, leading to the abrogation of Bait al-Maqdis (in Jerusalem) as the Qibla, reinstating the Kaaba (in Mecca) as the Qibla.

People then perceived that Muhammad was angered by the Jews' refusal to accept him as a prophet, and in retaliation, he changed the Qibla. In response to this criticism, Muhammad called these critics "fools" in the Quran. The Quran mentions it as follows:

Surah Al-Baqarah, Ayat 143 to 146:

The foolish among the people will say, "What has turned them away from their Qibla, which they used to face?" ... We only appointed the Qibla which you used to face to see who would follow the Messenger and who would turn back on his heels.

Consequently, people (including Muslims) began to question what kind of God this was and what kind of wisdom it was that first directed them to face the Kaaba, then changed the Qibla to Jerusalem, and then, after a year and a half, due to the Jews' hostility, decided to change it back to the Kaaba.

It was impossible for the author of the Quran (i.e., Muhammad) to adequately answer this objection. Therefore, to silence these critics, Muhammad addressed them in the Quran as "fools." He then presented the excuse that Allah wanted to see who would turn back on his heels.

This is an extremely strange excuse, implying that Allah changed the Qibla twice just to see some people turn back. The most interesting point is that history does not record even a single person who turned away from Islam due to the Qibla change.

Thus, the question remains for Muslims: if not a single person was to turn away from Islam because of the Qibla change, what was the need for Allah to change the Qibla twice? It is clear that Muhammad used Allah's name to express his personal enmity towards the Jews.

Just think, if there really were an All-Knowing and All-Wise Allah in the heavens, who possessed knowledge of the future, would He orchestrate such a drama of changing the Qibla twice?

And would He insult people by calling them "fools and idiots" when they were rightly questioning the absurdity of these two pointless Qibla changes?

Do these dramas of changing the Qibla twice not seem more like "human errors" rather than divine revelations to you?

The background story:

The Jews of Medina gave Muhammad the opportunity to show them the "Miracle of Fire" as proof of his prophethood. It was an established way of proving the prophethood as has been confirmed by the Quran too. However, Muhammad (and his Allah) failed in showing any miracle, and they made an excused for it. 

Quran 3:183:

They (the Jews) said: "Allah took our promise not to believe in any messenger unless He showed us a sacrifice consumed by Fire (From heaven)." Say: "There came to you messengers before me, with clear Signs and even with what ye ask for: why then did ye slay them, if ye speak the truth?"

Obviously, the Jews didn't accept this Quranic excuse as even if it was true, still they were not responsible for the crimes of their forefathers. 

As a result, not even 10 Jews accepted Muhammad as a prophet, which made him furious:

Sahih Bukhari, 3941:

عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ لَوْ آمَنَ بِي عَشَرَةٌ مِنَ الْيَهُودِ لآمَنَ بِي الْيَهُودُ

Narrated Abu Huraira: The Prophet said, "Had only ten Jews believe me, all the Jews would definitely have believed me."

But the Jews of Medina still refused to accept him as a true prophet, and that was the point where Muhammad's enmity and hatred started against the Jews:

  • First of all, Muhammad changed the Qibla once again from Bait al-Maqdis to Ka'ba in Mecca. 
  • Then he started openly threatening the Jews to accept Islam, otherwise, they would be expelled from Medina, and he would snatch away all of their lands by force. 

Sahih Bukhari, 3167:

Narrated Abu Huraira: While we were in the Mosque, the Prophet (ﷺ) came out and said, "Let us go to the Jews" We went out till we reached Bait-ul-Midras. He said to them, "If you embrace Islam, you will be safe. You should know that the earth belongs to Allah and His Apostle (only), and I want to expel you from this land. So, if anyone amongst you owns some property, he is permitted to sell it, otherwise you should know that the Earth belongs to Allah and His Apostle."

This is the whole story behind the change of Qibla from Jewish Jerusalem to Meccan Kaaba. 

Why did Allah make the Ka'ba (in Mecca) the Qibla twice, while 360 idols and images were present there?

Even the first instance of making the Ka'ba a Qibla is questionable, considering there were 360 idols and images of pagan gods present in the Ka'ba.

Logically, if there were truly an Allah in the heavens, He should have directed the Qibla to be Bait al-Maqdis right from the beginning to avoid prostration to idols and images of pagan gods.

How can a prayer be accepted in such a Ka'ba with idols and images, when prayers are not accepted in a house where there is a single image present (even of any non-god, but of any animal or living thing)?

The Ka'ba could have been declared the Qibla after the victory of Mecca when it was cleared of all those idols and their images.

This is yet another proof that no Allah exists in the heavens, as these Islamic rulings follow no logical path.


PS:

Some examples, where this so-called "Test" was used as an EXCUSE to hide the FAILURES of Allah/Muhammad:

It became impossible for modern Islamic apologists to deny millions of testimonies of these millions of Muslim gay people. This ultimately compelled modern Islamic apologists to come up with a new narrative i.e.:

"Although one may feel helpless when they fall in love with someone of the same sex, nevertheless, Allah prohibited it, considering it a "Test or Trial". You are not committing a sin simply because you are gay and feel attracted to someone of your own sex and fall in love with them, but engaging in sexual acts with them would be considered a sin and you must be killed in most horrible ways.. "