Building on the prior travel time discussion, the distance between Barcelona and Madrid is basically identical to the distance between San Francisco and Los Angeles. Travel time on the new AVE line nonstop trains is 2:38. Travel time on trains which make local stops is 3:23. Various places on the internets suggest that the train has taken about 25% of airline passengers since it opened.
Add in obvious points that this is center city to center city to travel, don't have the big security hassle, etc..