Here "hearts" refers to the desires of people. Alternate translation: "God understands your true desires" or "God knows your motives" (See: [[rc://en/ta/man/translate/figs-metonymy]])
This can be stated in active form. Alternate translation: "Those things that men think are very important are things that God hates" (See: [[rc://en/ta/man/translate/figs-activepassive]])