Some works of architecture have remarkable aesthetic value. According to certain philosophers, part of this value derives from the appearance of such constructions to fulfil the function for which they were built. I argue that one way of understanding the connection between function and aesthetic value resides in the concept of functional beauty. I analyse a number of recent accounts of this notion, then offer a better way of understanding it. I then focus my attention on the relation between aesthetic and moral values and claim that, if the notion of functional beauty makes any sense at all, then we have a pro tanto case for holding that moral defects in works of architecture can have aesthetic merits.