Gas masses tightly correlate with the virial masses of galaxy clusters, allowing for a precise determination of cosmological parameters by means of large-scale X-ray surveys. However, the gas mass fractions ( f gas ) at the virial radius (R 200 ) derived from recent Suzaku observations of several groups are considerably larger than the cosmic mean, calling into question the accuracy of estimates of cosmological parameters. Here, we use a large suite of cosmological hydrodynamical simulations to study measurement biases of f gas . We employ different variants of simulated physics, including radiative gas physics, star formation, and thermal feedback by active galactic nuclei, which we show is able to arrest overcooling and to result in constant stellar mass fractions for redshifts z < 1. This implies that the stellar and dark matter masses increase at the same rate, which is realized if most of the stellar mass is already in place by the time it assembles in the cluster halo-in agreement with observations. Computing the mass profiles in 48 angular cones, whose footprints partition the sphere, we find anisotropic gas and total mass distributions that imply an angular variance of f gas at the level of 30%. This anisotropic distribution originates from the recent formation epoch of clusters and from the strong internal baryon-to-dark-matter density bias. In the most extreme cones, f gas can be biased high by a factor of two at R 200 in massive clusters (M 200 ∼ 10 15 M ⊙ ), thereby providing a potential explanation for high f gas measurements by Suzaku. While projection lowers this factor, there are other measurement biases that may (partially) compensate. We find that at R 200 , f gas is biased high by 20% when assuming hydrostatic equilibrium masses, i.e., neglecting the kinetic pressure, and by another ∼ 10 − 20% due to the presence of density clumping (depending on mass and dynamical state). At larger radii, both measurement biases increase dramatically. While the cluster sample variance of the true f gas decreases to a level of 5% at R 200 , the sample variance that includes both measurement biases remains fairly constant at the level of 10 − 20% (depending on dynamical state). At the high-mass end (M 500 > 2 × 10 14 M ⊙ ), the true f gas within R 500 shows a constant redshift evolution. While this result is in principle encouraging for using gas masses to derive cosmological parameters, careful X-ray mocks are needed to control those various measurement biases.