I'm not so sure it was. I think it might have been a test to see what he could get away with. If he has still something left in the tank in the 3rd week of the Giro when domestiques are wearing thin, and he needs to take back some time in GC, it wouldn't surprise me if he pulls a stunt like that. It could be more tactical than you might think at first glance.
He says it was a pity nobody followed his attack, but he didn't make any effort in trying to get Lampaert over the hill while he was in his wheel, he just dropped him and left him for dead. If it was a training ride, it also doesn't make sense for him to sit up after 13 or so km. He could just have gambled to go for the stage, and see if he could make it (like in San Sebastian). Whatever the initial intention, i believe his little escapade provided the team with some valuable info.