Why is the linearity of a sensor a desirable feature?
Yes, you could have a sensor that responds like that (Y=X^2)  Your sensor must still reliably do that.  In a typical sensor, Y=cX+d where c and d are ideally constants.  Due to various factors, they usually aren't simple constants.  How close c and d are to really being constants is what is referred to as linearity.  In your example, you would probably have something like Y=(cX+d)^2 , which  would cause all kinds of fun.

Linearity as in "linear response" isn't the problem.  Linearity as in "the Y values closely fit the expected linear response" is what you want.  In your example, you wouldn't be concerned with whether the a plot of Y and X is a straight line.  You would want your plot to closely match the expected parabolic curve.  It most likely won't perfectly match. For a sensor with a linear response, you would say that the linearity is poor.  For one like your proposed sensor (Y=X^2) I don't know what you'd call it - maybe just "poor response."

Poor linearity in a typical sensor means that you have to do more work to get X if you know Y.  With an ideal sensor with a linear response, you can calculate X eaisly if you know Y.  With real sensor with good linearity, you can (with in reasonable limits) determine X from Y.  With a real sensor with poor linearity, you have to go to greater lengths to determine X when you know Y.  Maybe its response varies greatly with temperature, so you have to track temperatur as well and use it when determining X from Y.  Maybe it just isn't very linear, and you have to use some funky curve to relate X and Y.  In either case, your job as an engineer is much easier if the sensor closely approximates the expected straight line.  Often times this works out to making a system simpler to calibrate and more reliable - but also more expensive since a better sensor usually means more expensive.  Sometimes you'll want to go with a cheaper and less linear sensor, and compensate for its failings in software.