That’s a pretty big topic to describe in one post, regarding coordinate transformations. The short answer is, you need some convention, maybe -1 to +1, or 0 to +1, or 1 to #pixels, and OpenGL happens to pick the first one. As long as you’re consistent, then it doesn’t matter which one is used really. I’d recommend reading some good tutorials on this topic, like this one : https://learnopengl.com/#!Getting-started/Coordinate-Systems, which discusses all the transformation steps you really should understand to program with OpenGL.
Regarding the glRotatef function, that’s old school OpenGL I believe, and is not used anymore by 99% of coders. So if you want to use modern OpenGL then ignore that function. And if you need that kind of functionality, then best invest some time looking at something like the glm library (https://glm.g-truc.net/0.9.9/index.html), which will make your life easier