I can make the same function without the & and it would still work.
No, you can't. Remove the ampersands and you have a very different function. This new function makes copies of the arguments passed to it and returns a copy. With the ampersands, the function does not make copies. The returned value is an alias of the larger input.
Here's another example: Take away the const
qualifiers to both the arguments and the return value. With this change the function can be used on the left hand side of an assignment. There's no way you can do this without the ampersands.
#include <iostream>
template <typename T>
inline T & Max (T & a, T & b) {
return a < b ? b : a;
}
int main () {
int a = 1;
int b = 2;
Max(a,b) = 42;
std::cout << "a=" << a << " b=" << b << "\n";
}