That is true, but if you want to change X or Y? Maybe you want user input or the values will dynamically change during a certain time. We don't know the purpose for making your code but calling functions is crucial in C++ as you will use it in almost any program.
The example x + y is relatively trivial and the function plays no useful role there. But say you needed to to something more complicated, such as calculate the average, or maybe the root mean square value of a list of numbers. Here the calculation may be more complicated, and simply clutters up the body of main(). It also means the function can be tested and debugged, and then simply used over and over, without the need to repeatedly write the same code.
Also, with the use of sensible naming of a function, it makes the code more readable, as the meaning can be understood without having to analyse the intricate details of the code.
Your example is too trivial. To claim that functions are useless based on that is like claiming that cars are useless because it takes you 30 seconds to get to your neighbour, but it takes 5 minutes by car.
Functions are useful because
a) They allow for code reuse and decrease code duplication.
b) They are making code easier to read: instead of trying to make sense of algorithm used, you can just look at function name and understand what it does — invert(matrix) vs monstruosity which underlying algorithm is (even worse if you do not use other functions like det() and transpose() inside)
c) They hides irrelevant detail of implementation from user, allowing to concentrate on problem on hand.
d) Code with functions can be more effective and fast..
e) It is easier to debug
f) Recursive calling is possible only within functions