The purpose of applying a Tone Response Curve (gamma) is (these days) primarily to optimise the encoding for 8-bit coding spaces like jpeg. It's also used for histograms to get a perceptually-uniform histogram. Historically, it was also used to compensate for the characteristics of CRT monitors.
However, as D Fosse says, the end-to-end TRC of the system (from camera to monitor) is linear. It must be, or what you see on the screen won't look like the original scene. A colour-managed system is designed to ensure this - linear end-to-end TRC. So if you alter the gamma in the monitor calibration, a colour-managed program should merely compensate for this in it's software, so you don't see any change! That's what colour management does.
When you use non colour managed software then a problem arises that most image files have a TRC applied - typically a gamma of 2.2 (sRGB is slightly different but similar). Without colour management, that TRC won't get removed. However if your monitor has a gamma of 2.2 (actually, the inverse of that) then it compensates without colour management. But if you alter monitor gamma, non colour managed software will display differently.
I hope that makes sense.