Question: Does changing the `.htacces` file to allow the programmer to have **PHP** codes in an HTML file (extension `.html`) compromise with the security of the page?

Is that the reason why files with any **PHP** scripting are given the extension `.php`?

Answer: 
No. It does not yield any security problem if the file is interpreted and executed as a php file. You can even make any extension like ".asp",".jsp" anything you want. Furthermore this may sound a more secure way since an attacker sees the extension and thinks that it is an asp file. 

However in my opinion it is not a good practice and may make development more confusing. I think if it is a php file the extension should be .php

If your desire is to provide security You should check url rewriting and hiding the extension. This way is a more convenient approach.
The only thing security related that you can add to `.htaccess` is user authentication. Beyond this, there is nothing that `.htaccess` can provide that will enhance the security of your application.

Do not rely on `.htacess` gymnastics for security purposes.

If you are porting over an existing website and doing it in stages, then it makes sense to use the same URL as those that might be bookmarked or referred to by other areas of your application; in this case you can use .html

If possible, try to use redirection and you *can* do that using `.htaccess`; but in some cases (for example, if you are trying to convert an existing file that is the target of a POST form into PHP) adding a redirect will make the form unusable as the payload will be discarded.