Well Cain was petty, insecure, dishonest, self serving, needy... and murderous.
And Ishmael was a result of not trusting God, nor was he the one intended for the promise. It was man's lack of faith and interference that put the "first son" there. The original goal was always to choose the son...