It looks like a naïve attempt to block access to a PHP file an attacker may have placed in a hidden directory (i.e. one that starts with a dot).
It blocks more than that (any directory that contains a dot) and doesn't prevent the attacker from accessing hidden PHP files.
If you are sure that this won't match any legitimate URIs, then there's no harm in leaving it there. On the other hand, there's no benefit either as any attacker who can place a PHP file in a hidden directory can place a PHP file in any other directory.
A better approach to security would be to prevent attackers from uploading PHP files at all and to use a file integrity system such as AIDE or OSSEC.
I could be wrong about the purpose of the
location but the original author didn't describe the rule with a comment so it's difficult to be certain.