expression
all for the best; what is right
Fixed expression meaning that something is ultimately for the best or is the right thing. Often used in the phrase 良かれと思って (thinking it was for the best).
良かれと思ってやったことが裏目に出た。
What I did thinking it was for the best backfired.
彼は良かれと思って忠告したのだ。
He gave advice thinking it was for the best.
良かれ is a fossilized form of 良い in the classical imperative mood, now used only in fixed expressions.
Derived from the classical imperative form of 良し (yoshi), the old form of 良い (yoi). The exact historical derivation is uncertain, but it survives in modern Japanese as a fixed expression.