It was built, most likely, to replicate the American capability of launching, stealing a satellite and returning within a single orbit (hence the cargo bay the size of a Hubble/Keyhole and the enormous wings). Since the Energia was a stand-alone heavy launcher (that didn't rely on shuttle engines), that they had a whole fleet of lighter launchers and the Soyuz/Progress were excellent for carrying astronauts and cargo to LEO, the only mission for which the Buran was indispensable was stealing American spy satellites.
That's a very narrow niche for a very expensive spaceplane.