PINOCCHIO and the hierarchical build-up of dark matter haloes