I've had contractors tell me there had to be at least 5-6 feet between the green and a bunker so they could run the trencher through there to put in the irrigation loop. They get two choices: dig it by hand, or don't loop it. They usually manage to get the trencher through in three feet on those terms!
A lot of the Sand Belt courses have zero feet between the edge of the green and the bunker lip. They hang the mower reels right off the edge of the bunker.
It does cost a little more to maintain a course every time you put a bunker really close to a green ... it slows down the maintenance crew a bit when they have to be careful. But sometimes it's worth it. If you put all the bunkers 15 feet off the edge of the green, and the flag another 15 feet the other side of the edge, good players have to hit it downright fat to leave it in the bunker.