That probably would have been the better move as far as "optics" are concerned, but the Spanish constitution states that this kind of referendum is illegal.
In any case -- I think the ruling party in Spain wanted this to flare up so they could consolidate political support during the next election, since most of Spain is adamantly opposed to Catalan independence.