Its original purpose seems to have been a place SLS would be able to get to, and then SLS would have the purpose of getting to it, in the same weird way that the ISS was a place the Shuttle could get to, and the Shuttle was needed to resupply ISS. Until it wasn't; and now the ISS has no purpose or value. Don't need SLS to get to ISS, so make a "Gateway" that does.
Make no mistake, a "Lunar Gateway" is much worse than completely useless. If you want to go to the moon, go to the moon. If you want to go to Mars or an asteroid, go there. Stopping at lunar orbit, effectively halfway, just costs a huge amount of extra fuel to stop and then start again.