I believe this is 'social proof' phenomena. Basically, people are more inclined to buy something or perform actions if they believe that other people have done the same. It gives them confidence and a belief that their actions are 'approved' by other people.
A nice experiment is summarised in this paper:
In the elegant experiment described in Salganik et al. 2006, researchers constructed an
online music market and examined the role social influence played in which songs
participants chose to download. The experiment revealed that increasing the extent to
which participants were able to observe the selections of others [...] led to an increase (decrease) in the popularity of the most
(least) popular songs and a decrease in the predictability of song popularity based on
In other words, by showing the "number of downloads" statistic, users' perceptions of quality changed and they were more likely to download music if it was downloaded by others.
Other examples of social proof include product ratings on Amazon, customer reviews and number of upvotes on this question/answer.
Interestingly, it's also suggested that queuing for a product increases its value -- perhaps being the first to do something gives people a euphoric feeling, hence why "n people are viewing this right now" could be encouraging (this is my guess).
This is a very clever trick that Expedia is using, and has certainly made me think about using it in the future.