The reason that 'w' is called 'double u' is because the Latin alphabet, which the English language inherited, had no letter to describe the sound that is denoted by the letter 'w' in modern English. Before the use of w, many people used 'uu' to denote the sound in text and was then printed as 'vv' which was then shortened to 'w'. That is why we call 'w' 'double u'.
The reason why vacuum is spelt with two u's is to do with its Latin derivation - vacuum - meaning an empty space. So in this Latin context, before the letter 'w' was in use, the 'uu' had nothing to do with the 'w' and is therefore not interchangeable.