Labienus was Caesar's right hand man throughout all the key campaigns pre Rubicon. After everything they saw and did together, and the huge degree of trust Caesar had for him, Labienus must have had a substantial reason for his actions. He certainly was willing to die for it.
No one knows the answer to this question for sure. There are several theories:
Caesar's move into Italia was controversial and politically fraught; it was divisive, and the Roman elite found themselves sorted into factions based on their personal convictions. It is possible that Labienus simply did not agree with Caesar that the senate had acted against the best interests of the SPQR in denying him a run for a second consulship in absentia. Perhaps he simply felt that flaunting the boundaries of Caesar's imperium was not a legitimate response, no matter how much the great general had been slighted. Cicero thought he had simply responded to his good Republican nature (ad Att. 7.12, e.g.).
Labienus was probably from Cingulum, in Picenum, and might very well have been a cliens to Pompey (ie under an obligation of personal and political support). Pompey had many, many clients in Picenum due to his father's activities there during the Social War. Labienus was an equestrian and an outsider, and he needed the support of a prominent Roman to get ahead in the world. It seems his goal had always been a military career, and in 63 as tribune of the plebs he made moves that supported or were supported by both Pompey and Caesar. It is possible that he went with Caesar to Gaul as legatus in 58 under Pompey's blessing. In that case, it is also possible that, when push came to shove, he felt his original loyalty to Pompey was more important than his loyalty to Caesar. Or maybe a mix of This is the great Roman historian Syme's interpretation, more or less.
Dio (41.43) wrote that he thought Labienus had simply become jealous of Caesar, and had come to think that he could best him on a neutral field. He was on the losing side at Pharsalus vs his old commander, but later in North Africa, Labienus proved that he could beat Caesar on the field, one on one. If Dio is right, this must have felt really good.
Aulus Hirtius (Bg 8.52) thought that Labienus had been convinced by a constant harassment by Caesar's enemies, sort of like brainwashing, which Caesar never wanted to believe.
I myself believe the simplest explanation is that Labienus thought his "star" was rising, that he had gone as far as he could go with Caesar, and that his prospects for continued advancement were better with Pompey (and the senate) than with Caesar. He probably rightly understood that Caesar would be successful in the invasion of Italia, given that he had personally led many of the eleven veteran legions at Caesar's disposal. It is probably likely also that Labienus was a key advisor in convincing Pompey to flee Italia at Brundisium rather than try to stand and fight with Domitius or the consuls in the chaos of February of 49 BCE. Labienus almost certainly wanted to be consul, and then proconsul himself, and perhaps he realized that a Caesarian dictatorship would not be satisfactory. Still, he more than anyone else had to realize how powerful Caesar had become, and how weak Pompey had become.