Gathering data through measurements is at the basis of every experimental science. Ideally, measurements should be repeatable and, when extracting only coarse-grained data, they should allow the experimenter to retrieve the finer details at a later time. However, in practice most measurements appear to be noisy. Here we postulate that, despite the imperfections observed in real life experiments, there exists a fundamental level where all measurements are ideal. Combined with the requirement that ideal measurements remain so when coarse-grained or applied in parallel on spacelike separated systems, our postulate places a powerful constraint on the amount of nonlocality and contextuality that can be found in an arbitrary physical theory, bringing down the violation of Bell and Kocher-Specker inequalities near to its quantum value.