These two things have gone quite wrong in Spain. Universities were not prepared to transfer all the logistics at all so they have just said that the academic calendar gets shifter for the duration of the first half-month. This has led to students to gather to do "botellón" (the classic drinking in the park and the streets), which has led to larger concentrations than the expected for normal attending to classes. The same goes on for coorporations, they don't had previous clear plans to transfer their workforce to home (those plans require a legal framework and a lot of thinking and everything has to be paid by the coorporation). The result is that many have gone home without clear instructions on how to continue their job (sometimes is just impossible) so, before the lockdown, many workers from Madrid have been rushing to the beaches in Valencia thinking of this crisis as a holiday and gathering in mass on the beaches.
Madrid had half of the infected people in Spain, and these measures incentivized the concentration of people and the propagation towards other regions of the country. Now that we have realized that many people is going to die we are starting lockdown. Nearly a month after what epidemiologists asked for.