Because there are two different cores which can run the operations independently.
pthread_create creates another thread the original thread is still alive.
My guess for this would be because we only have a single execution context on each core.
I would add to @legolas's first point that the two cores can only process instructions from independent instruction. This is critical: without launching a second thread, the application will never see any benefit from the additional core.
Each of the two threads runs one of the lines commented with "do work."
A thread is a programming abstraction that maps at the hardware level to a single instruction stream: each thread has its own control path through the code, which determines the sequence of operations in its corresponding instruction stream.