Why Front-to-back ratio compares the signal strength radiated (or received) in the direction of the main lobe with the strength radiated 180 degrees behind the antenna, expressed in dB. A typical HF Yagi might show 15 to 25 dB of front-to-back, meaning the rearward signal is that many dB weaker than the forward one. It is a measure of how well the antenna rejects interference coming from behind, not a measure of how much gain it has forward.
Watch out The choice comparing forward gain to a dipole is describing gain in dBd, a separate specification; an antenna can have high gain and still have poor rejection off the back.
Front-to-BACK: front lobe versus what's directly BEHIND you, in dB. Gain is forward, F/B is rejection.