Arthur Schopenhauer said this quote

The true basis and propaedeutic for all knowledge of human nature is the persuasion that a man's actions are, essentially and as a whole, not directed by his reason and its designs; so that no one becomes this or that because he wants to, though he want to never so much, but that his conduct proceeds from his inborn and inalterable character, is narrowly and in particulars determined by motivation, and is thus necessarily the product of these two factors.