First of all they just might stay there till the finish. I have seen it occasionally but it is definitely rare. Usually the peloton wont let a rider get too far ahead.
Second it is about visibility for the sponsors and teams.
Third a rider who is riding through his home region or town will often be allowed to do a bit of a breakaway. Or like today Bradley Wiggins off the front partly for his own presence and confidence but also a little bit to honour another British cyclist Tom Simpson who died 40 years ago today on the Ventoux (reportedly his last words were "get me back on the bike")
When it is a break of quite a few riders it is often so there is "somebody up there" for when the team's favourite(s) come up towards the finish.
Some riders are even known for mad breakaways. The Frenchman Jacky Durand springs to mind. Used to go off into the distance for 150 km stretches stage after stage (well not the mountains obviously). A rider like this usually wins the Combativite' of that day.

Whatever they do they have to have the permission of the Directeur Sportif.
Chess on wheels!