Why do we have an alkyl shift rather than epoxidation in a pinacol reaction? I don't understand why the hydroxyl group doesn't attack the positive charge.
When the first Pinacol rearrangements were being studied, there was a suggestion that the product of the reaction was indeed the epoxide (migrations/shifts weren't well known reactions at this point in time, and methods of characterisaton were limited). The reaction that was being attempted is shown below (source: Wikipedia), however at this point there was even dispute over the structure of acetone, further adding to the complications.
Today, we of course know that Pinacol and semi-Pinacol rearrangements occur when vicinal diols are treated with protic acid (or Lewis acids) to give the carbonyl product as a result of a [1,2]- alkyl shift.
Looking at the mechanism (below), we first have a rate-determining loss of water via protonation-elimination. This generates the all important cationic intermediate.
The simple answer to your question is that rearrangement occurs faster than epoxidation (which is never observed to any significant extent), this is intuitive if we consider that:
As an aside, if you'd kept reading through Clayden by another page or so, you would have discovered that epoxides also undergo Pinacol-type rearrangements, so realistically even if the epoxide did form, it would simply re-open under the acidic/Lewis-acidic conditions before undergoing a rearrangement reaction.