Is it okay to ask an unknown professor or researcher for their PhD thesis via email?
Yes.
I did it a lot and always got the thesis (or any other kind of paper) sooner or later. Typically, you are also likely to get a positive answer if you ask politely and provide the author with the details on why you need the thesis. After all, the author wishes to promote his or her name.
In certain rare cases, you'd get a negative answer:
Thesis contains classified information, and you are not allowed to read it (e.g., you are in the US and asking a Russian for his/her dissertation on ICBM-related technology).
The thesis has low quality. ("I wrote it late at nights.")
The thesis is old and available only in print, so sending it would take more than 5 minutes.
The thesis is lost and even the university library does not have it any more.
The author lost interest in research.
The author is busy and you seem too unimportant to bother to answer.
The author wants to get the thesis published first and only then share it. (Thanks to @greenb.)
Again, all these cases are rare.