I believe it sat vacant for that 6 year period.
Perhaps the Queen was waiting for a change of heart from the Government over its funding. Or perhaps it was being considered as a future home for another member (or members) of the Royal Family. But eventually, as we know, The Queen agreed to allow its use by the Commonwealth.
I don't know on what legal basis the Secretariat occupies the house. Most Crown owned properties seem to be given out on fixed-term leases or grants. Assuming that applies, eventually the house will revert back to the Crown and could possibly, one day, again be used as a royal residence.
After all, Kensington Palace is being slowly phased out. So perhaps St. James, Clarence House and Marlborough House will be increasingly needed to accomodate royal residents or offices. For example, after Charles succeeds, Clarence House will likely be William's London home. Would Edward and Andrew continue to have their London apartments at Buckingham Palace? Or would they need to move elsewhere to make room for Harry and his eventual family?