It was never a conquest, the USSR and Afghanistan had been friends and allies for a long time, and from the Soviet point of view, they were preserving Afghanistan's sovereignty in the face of a foreign rebellion which was backed by the Pakistanis.
The problem is how they did not understand how it wasn't an issue of religion versus secularism, so much as it was one of monarchism versus republicanism.