Here's why:
* "He" is the subject pronoun (used when the pronoun is performing the action).
* "Him" is the object pronoun (used when the pronoun is receiving the action).
In the phrase "between he and David," "he" is acting as the subject of the preposition "between." Since the pronoun is the object of the preposition, we should use the object pronoun "him".
Example:
* "The secret is between *him* and David." (Him is the object of the preposition "between").