I am reading Bartle and Sherbert's "Intro to Real Analysis" and in motivating the definition of a function as a relation they make the statement, "To the mathematician of the the early nineteenth century, the word "function" meant a definite formula .... This understanding excluded the case of different formulas on different intervals, so that functions could not be defined "in pieces" ". (They then go on to make some generalizations about problems with distinguishing between a function and its values and the difficulty with interpreting the phrase "rule of correspondence")
I find this statement unconvincing for 2 reasons: first, we commonly define piecewise functions (like signum for example), and nobody really has any trouble understanding what is meant by this. Secondly, it seems like whenever I try to work a proof using the definition of a function as a relation, it seems much more difficult and complicated.
Are there applications or maybe areas of math one encounters later, where it is genuinely useful to view functions from this point of view, or is this more like a "Bourbaki" definition for purists. The only case I can see where this definition is actually useful at the level of math I'm studying is if I simply want to draw a graph of some general function (without a formula) and claim it is a function (b/c it is a subset of the Cartesian plane, which by observation, I can see passes the vertical line test).