what is the function of the expression what made her choose me

Function?

It's a clause, and it could be an independent clause (simple sentence) if you put a capital at the beginning and a question mark at the end. It could also be a dependent clause if it's attached to another independent clause.

Who knows??