Steal someone’s heart
Here’s what it means
To deceive someone or secretly win the loyalty of that person's followers.
Why the Bible says it this way
In Genesis it means deceiving by leaving without notice; in 2 Samuel it means capturing the people's allegiance.
An idiom is a familiar phrase whose meaning comes from the whole expression, not from reading each word by itself.