The best time to visit Saudi Arabia is from October to February. This period is cooler, perfect for outdoor activities and sightseeing, and more affordable for a visit.
During the October-February period, Saudi Arabia experiences a lovely drop in temperature that makes it more comfortable for travelers. Highs range from 69F to 94F, so everything from the beach to camping in the mountains is possible!
The worst time to visit Saudi Arabia is in the summer, from June to August. Temperatures soar with little to no rain and hotels and flights are more expensive.
June, July, and August are the worst months to visit Saudi Arabia mainly because of the heat. Temperatures during the summer season range from 107F to 110F in Riyadh, but get as high as 130F in the desert.
https://ing.org/resources/for-all-groups/calendar-of-important-islamic-dates/
So, basically, this is because the Islamic calendar happened to, this year, specify that the middle of summer was the time to conduct hajj.
If religious authorities could work the theology to do this during a different season, would make a lot of problems go away.
https://travellersworldwide.com/best-time-to-visit-saudi-arabia/