Because some verbs require prepositions to use an indirect Object and others don't. "him" in this case is an "indirect object". "ask" doesnt require a prepositon for any of the objects it can take.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.