Although college presidents were forbidden to marry initially, this changed towards the end of C16th and as a result appropriate accommodation for the principal academic and his wife was built, above the cloisters.
The 'student accommodation' pic is actually the library of Darwin College - I don't think any of it is student rooms. One of the nicer examples of 1970s (?) architecture in Cambridge, I think. Incidentally the old part of Darwin (just visible on the left) was owned by Charles Darwin's family.