Because it wouldn't make sense as a function.
It's a compiler-related operator. The compiler replaces all sizeof "calls" or operations with the actual size_t value.
Meaning if I write this:
The compiler will replace sizeof(szBuffer) with 100 before it's even compiled. Most of the time, sizeof() is required in C for functions calls where arrays are passed as pointers, and the size of the array in question is needed.
C++ requires the usage of sizeof much less than C since these details are usually hidden by other means. For example, sizeof would be good to use in a malloc() call in C, but C++ has new for memory allocation which handles the sizing issues automatically based upon the type and sizeof is not needed.
Back to your question, a function would be pointless since the discovery of types and their sizes is done at compile time. Now in cases where the size of something needs to be known at run time.... that's a different ballgame.