On a grain boundary some of the 'dangling bonds' of each surface are no longer dangling and there is some bondage between grains. A dangling bond is of higher energy than a real bond, so less dangling bonds, less potential energy.
Dangling bond aka unsatisfied valency