Think about an auction, where the designer is selling good and trying to sell it to the person that values it the most while collecting as much revenue as possible.
A direct mechanism means that the seller asks buyers for how much they value the good and based on that decides who gets the good and how much they pay. Suppose that the designer uses a second-price auction so it tells the buyers "tell me your valuation and I'll give the good to the person with the highest valuation, but this person will only pay the second-highest valuation.
If the seller has commitment power (for example if they can write down the rules in a binding contract, etc), this auction achieves exactly what the designer wanted to do, maximizes revenue, allocates the good to the person who values it the most, and it is incentive compatible. However, notice the temptation that the designer faces:
Suppose the highest valuation is $\$2,000$, and the second-highest valuation is $\$1,200$. If the designer lacks commitment power, the designer might change the rules after learning the valuations and charge a lot more than $\$1,200$ for the good. However, if the bidders know that the seller lacks commitment power they will not truly reveal their valuations and there is no guarantee anymore that the auction will obtain good results.
Now keep assuming that the seller has no commitment power, but consider the following mechanism that is NOT a direct mechanism. Suppose the seller runs an ascending price auction. That is, bidders yell out how much they want to pay and can outbid each other as much as they want. Whoever's bid is the highest gets the good and pays what their last bid. Now the seller does not know exactly the valuation of the buyers, and arguably is no longer tempted to change the rules in the middle of the auction.
In conclusion, if there is no commitment, a not-direct mechanism can out perform a direct mechanism.