Yeah, this was established as a fact by Tobirama with the whole curse of hatred thing. They suffer from a biological mental disorder that leads to these personality shifts. They are filled with love to an extreme and can easily change to extreme levels of rage and hatred.
Actually it makes a great deal of sense that the Uchiha have a genetic mental disorder, the clans work by inbreeding, and inbreeding has a history of leading to things like mental illnesses.
I am surprised other clans don't have some mental disorders actually.
Just be thankful there aren't any Uchiha women around, because if you thought the men had mood swings then the Narutoverse would shit itself if there were Uchiha women ninja.They would've unlocked the Mangkeyo just by having their time of the month and would beat everyone in a fight.