Christophe's post, whilst fully correct, does not actually answer the question why the terms look like they do.
To give you definite answer for the reasons, you would have to ask someone from the C++ standard committee, but let me make an "educated guess":
There was already a function name
std::abs in use for the euclidean norm for
double values, long before
complex made it into the standard lib. So to stay consistent, the library designers chose to overload
abs for complex numbers accordingly. And providing a second alias like
norm for the same function would not improve the lib, but only create some confusion.
But: it also makes a lot of sense to provide a function for the square of the euclidean norm. For many use cases (for example, any kind of least-squares approach) this value can be used instead of
std::abs, without the performance penalty of calculating a square root. If one looks at other function names in the standard lib, it seems pretty clear the designers prefer short, concise and easy-to-remember names over artificial names like
square_of_abs. So they decided to use
norm, which may not express the usual meaning in analysis, but is at least not inherently wrong in number theory.
Note in different fields of mathematics (as well as in programming or other domains), terminology can depend heavily on the context, there is often more than just "one truth". A standard library or component like
complex which is probably used in many different contexts will have to make terminology choices which are always fit better to some cases, and less to others.