I wish to understand how lengthy certain files like css, html and js are desirable to become cached by .htaccess setting and why different time setting for every file type?

In couple of good examples i saw that somebody cache html for ten mins, js for any month and imagery for any year.

It is dependent how frequently an origin is up-to-date. You HTML submissions are most likely dynamic, which means you can't cache it for any very long time. Otherwise a customer sees the alterations following a lengthy delay.

On the other hand, pictures are hardly ever up-to-date, so that you can set longer cache time.

The JavaScript files are frequently up-to-date for brand new features or bugfixes. Maybe use a version number with this files (core.js?v=12323) to ensure that you are able to alter the number inside your HTML content to obtain them rejuvenated with a customer. By doing this you are able to cache them for a longer period too.