Once, the great sage Rishi Bhringi (as also people in many religions), falsely believed that men are superior to women. So, Rishi Bhringi used to worship Lord Shiva and he would disregard Maata Parvati. He was focussed in his devotion only to Lord Shiva.
Lord Shiva decided that he had to help Rishi Bhringi realize the right knowledge and come on the right path. So, God showed Rishi Bhringi the roop of Ardhanarishvara, where God is both man and woman – half Shiva and half Shakti. After seeing this, Rishi Bhringi had to to pradakshina around the unified form of Shiva and Shakti.
Shiva and Shakti are not different, and both are inseparable.