Why did the pilot flying pull back in the moments after the auto-pilot disconnected on AF447?
It's not accident speculation when it has been investigated.
The full accident report is available online with a very adequate summary on Wikipedia.
There are many reasons, but from the human factors study:

The final BEA report points to the Human Computer Interface (HCI) of the Airbus as a possible factor contributing to the crash. It provides an explanation for most of the pitch-up inputs by the pilot flying (PF), namely that the Flight Director (FD) display was misleading.
The pitch-up input at the beginning of the fatal sequence of events appears to be the consequence of an altimeter error.

The crew present in the cockpit at the time of the pitot blockage lacked experience/training, and were bombarded with conflicting warnings and indications.
As I've been reminded in a comment, they were also in darkness over an ocean with no external visual references.

A note on how human factors studies can relate cause and effect. There is a certain reaction time that we are unable to exceed, roughly it's 200 milliseconds for a trained person anticipating an event. It's longer otherwise and there are many studies on that. When a control input is put up against the various indications, and taking into account the reaction times to the different aural and visual warnings, then scientifically the probable cause can be known within reason.

From page 42 in the BEA report:

The drop in Mach also impacts the SAT and thus the true air speed and the wind speed.
In the following table, the case an A330-200 flying at FL 350 at Mach 0.8 in standard atmosphere with a 30 kt head wind is given as an example to illustrate the consequences of pitot icing that would result in a drop in Mach from 0.8 to 0.3.

During Pitot probe de-icing, the same variations occur in the opposite direction.

From the table, you can see how the BEA may have assessed that the likely reason for the initial nose up reaction by the pilot flying was to correct a ~300' altitude error.
They also say (p. 157):

The report specified that the stall was caused by inappropriate crew reactions to erroneous speed and Mach displays that resulted from blockage of the Pitot probes through atmospheric icing. The report stated that contrary to standard operating procedures, the crew had not switched on the Pitot probe heating.