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. It's a statute for employers and employees to contribute to the PF; however, you can also withdraw it before retirement. This provision was made to meet urgent financial needs; however, it totally depends on you how to use it.
By the way, law is not just law; it's a controlling regulation for the betterment of society and its members, and each law has an explanation.
Regards,
Rahul Chhabra