Q:

Why does declaring a variable call a constructor

I made a simple class to represent an x, y coordinate. It has an encapsulated  int for both and the following constructor:
//point.h
Point(int x = 3, int y = 5); // not zero for example purposes

//point.cpp
Point::Point(int x, int y) : x(x), y(y) {}

I then have a file main.cpp:
#include "point.h"
#include <iostream>

int main() {
    Point p;
    std::cout << "x: " << p.getX() << " y: " << p.getY() << std::endl;
    p.setX(7);
    p.setY(9);
    std::cout << "x: " << p.getX() << " y: " << p.getY() << std::endl;
}

Coming from a Java background, I expect that this would come up with a null pointer, but it instead prints:
x: 3 y: 5
x: 7 y: 9

My question is why the heck does declaring a variable call the constructor?

A:

You declared an object of class type and supplied no initializer in the declaration. This means that if the class has a user-defined default constructor, then that default constructor is used to initialize the object. That's just how C++ works. The language specification says that it happens, so it happens.
I don't see what "null pointer" you are expecting to see and where. There are no pointers anywhere in your code.

A:

If you are coming from java you are used to everything being allocated on the heap and using the new operator to create an instance of a class or datatype, it doesn't work like that in c++.
Point p;

is the same thing as 
Point p = new Point();

in java, except for a few obvious things.
You can achieve the same thing in c++ using the new operator
Point* p = new Point();

But you have take care of the memory management yourself and use
delete p;

when you no longer need p or you'll have memory leak. Memory leak will also happen if an exception occurs before you free the memory so the example above is not recommended.

