Why did Odysseus leave his family in the first place?

He didn't like his wife anymore and wanted to get away from her

He really wanted a daughter and was disappointed he had a son

He was told it was his fate to fight in the Tojan War so he left to go fight