Moksha is one of the Four major objects of life.
1.Dharma- Performance of duty
2.Artha- Earn Money
3. Kama- Fulfilment of desires
4. Moksha- Liberation from cycle of rebirth
As such there is no need to attain it. If we live our life on right-path, moksha happens automatically. Since world is full of misery, soul wants to rest in eternal peace which is its natural habitat, so it aspires for liberation.