It never occurred to me that you could once smoke in prison (and still can in some regions), but that you don't necessarily want prisoners walking around with lighters and matches. Thus prison supply companies still sell wall-mounted cigarette lighters to be used in common areas.
Interestingly enough, there is still good and bad design within this category of objects, depending on the intended environment. For instance, the oil and gas industries also traditionally installed wall-mounted lighters for smoking employees. Pocket lighters and matches were banned in these facilities, for fear of accidents; and by mounting the lighter well away from the danger areas, they could control and restrict the movement of smokers. Here's an example of an oil & gas industry wall-mounted lighter:
You've undoubtedly noticed there's two dominant form factors for prison-specific lighters: Flush-mounted, and faceted. That's because these are "anti-ligature" designs--i.e., a suicidal prisoner cannot get a shoelace around the top of these to hang themselves from. Presumably the oil & gas industries didn't have this concern.