Although the grey bar has the same shade everywhere, it seems brighter on the left side. It also seems as if the contrast is the same everywhere, even though there is an area of various pixels where bar and background have the exact same shade.
The brain always interpretes differences of brightness in a context. A color shade seems darker in a bright surrounding than in a dark one - a physically correct interpretation. This phenomenon is demonstrated by this example: The surrounding shade of grey influences the perception of the bar's shade, even though the latter doesn't change.