Thats the point of the algorithms contained in <algorithm> - for common tasks (like max) you don't need to mess around with templates and write it yourself (even if it is just a one-liner). However, max isn't the only use of templates.
I presume you are asking this because you are currently learning how to use templates, and you have to write a maximum function? Look at it this way - its a learning exercise. The point is to learn the syntax of templates. I mean there are many other examples of exercises given which are already provided, such as a dynamic array (std::vector) or a sorting function (std::sort).
On a side note, if you are going to be using std::max you should really add #include <algorithm> to your code.
Its likely that your compiler has <iostream> either including <algorithm> directly, or at some point defining max. The point is - its not portable, so moving to a different compiler (or a different version of the same compiler) might mean that it doesn't work. Get in the habit of including the files required for your functions.
A fairly easy one is the one on this site: http://www.cplusplus.com/reference/algorithm/ contains the most common functions. Sometime, if you have nothing to do, you can look through the various headers there and find all sorts of useful functions that you never knew existed!