Why did Cain bring the wrong sacrifice?

Because he had no faith and did not believe or obey what God had said.

Watch the Teaching: Why Was Cain's Offering Rejected but Abel's Accepted?