But, still Why did Itachi kill his entire clan?
The wife of the fourth Hokage was a jinchuriki, meaning she had a tailed beast inside her. That tailed beast was the nine tailed fox. During pregnancy the seal on the jinchuriki weakens and there’s a high chance of the tailed fox going loose and causing a rampage.
Uchiha Obito, calling himself Madara attacked the village at this very time, the exact moment when the wife of the fourth Hokage was going to give birth to Naruto.
As shown at the start of the series, the nine tailed fox went on a rampage and destroyed the village. Not to forget, hundreds of lives were lost in the process.
One of the things many people noticed during the attack was the fact that it was being controlled by someone. The nine tailed fox can only be controlled by a Sharingan user.
The village elders, namely Danzo suspected the Uchiha. He thought that the nine tails was being controlled by the Uchiha clan in order to gain power just like how Madara Uchiha did fifty years back.