Massa wasn't ahead of Bourdais at the point where the pitlane white line ended. Bourdais kept his inside line all the way through the corner, leaving plenty of space on the outside for Massa. What more should Bourdais have done in order to be "avoiding" contact?
Massa just cut in far, far too deep, spun off and the marshals penalised Bourdais in order to keep the championship more interesting. I can't see any other reason. The incident was Massa's fault, he spun and lost time. That's where it should have ended.