What is the reason only 2 bits are used for blue as opposed to red or green? Does it have to do with human perception of color or was it just an arbitrary decision?
It's a combination of being practical constraint by 8 bit words (*1) and adapting this to human physiology. The human eye is most sensitive to green and red (with a little tilt toward green), while least sensitive to blue (*2,3). See also this answer regarding why green is quite common.
For computing the most simple solution is to assign the colours in a colour word to an independent bit, leaving the misery that 8 cannot be divided by 3 without rest (*4). So next best is assigning a different amount to each. To do so the assignment with the least loss is to be selected, and that's where human physiology comes in again and tells that a reduction of resolution for blue is the least offensive. So the bit gets dropped there.
Bregalads Answer offers a nice and easy to use cookbook to decide what colours should get which bit length assigned when using dedicated bit fields.
Now, looking at the way we perceive light, It may be way more appropriate to use a palette instead of bitfields. Here colours (including brightness) can be specified in a way more natural way - just, handling them isn't as easy and cheap (*5).
*1 - This is where 'octal' word sizes would give a more 'natural' representation. Considering that computing started out with the majority of designs using multiple of 3 word sizes (see here as well), today's ubiquitous use of colour graphics seems like staircase wit.
*2 - Colour is a continuum, and the human eye has got certain spots of maximum sensitivity, but they are not hard focused, but ranges with a main peak. These ranges even overlap quite a lot between red and green while overlap between green and blue is small. Also the distances between are not the same.
To make it even more complex, Human vision also has a fourth component we usually assume with light and dark (B&W). While it has a quite wide sensitivity, it also has a peak just at the border between green and blue, partly filling that gap - one of the reason why we experience bluish light to be brighter than any other.
As result, we do see brightness on its own (with peak at 500 nm) plus three colours, but they are as well in different grades of brightness and all of them overlapping - perfect for neuronal networks, isn't it?
Remember that white/black/blue/gold dress?
*3 - See also this answer regarding why green (and amber) screens were most common
*4 - One of the disadvantages of being a Human. (Many) Birds feature four colour sensors, the additional being in near-UV. In addition, some have filters within their colour regions 'sharpening' colours. Something we seem to have lost. So they see colour not only more differentiated, but as well separated from brightness.
*5 - While light itself is defined on a linear scale and presented of a mixture of discrete values, human vision is not. Just have a look at the various colour scales that have been invented to describe human vision and you'll see that there's not an easy way to describe it in 2 or 3 dimensions at all. It's been a topic since ancient times and may go on forever.