I think what s/he's referring to are tests for mutations in certain liver enzymes that are known to interfere with a drugs function. These are cheap and quick tests (these aren't sequencing based tests) and quite good at predicting non-responders
On the other hand it can take 4-6 weeks to see if someone responds to a drug, and the drug can cause adverse events in addition to not treating the disease
So in this case it is cheaper, faster and safer to take the test before prescribing
The side effects of many of the medications can be quite harsh and severely affect your mental state when they don't agree with you.
The most obvious example of such would be the significant number of people who experience suicidal ideation or commit it/make attempts as a result of going on certain medications.
But at the less extreme end, you're likely looking at least a month or two, more likely 3 or 4 for each medication attempt. That's going on, taking it for long enough to have an effect, going back off, repeat.
With how severe the side effects can be for many, that's enough time to lose a job, fail out of college, etc. And you're asking them to potentially spend years in that cycle to maybe fine something that works.
On the other hand it can take 4-6 weeks to see if someone responds to a drug, and the drug can cause adverse events in addition to not treating the disease
So in this case it is cheaper, faster and safer to take the test before prescribing