The tests are there to confirm with statistics that (1) it works and (2) side effects are not too bad or too frequent.
That doesn't mean we understand why the medication works.