Dear Shyam,
PF was created to provide Financial Security to employees after their retirement, so that one can live a life with dignity and respect even after retirement. Its a Statute for employers and employee to contribute to the PF, however u can also withdraw it before retirement. This provision was made to meet the urgent financial needs, however it totally depends upon u how to use it.
BTW law is not just law, its a controlling regulation, for the betterment of the society and its members and each law has an explanation.
Regards,
Rahul Chhabra