Of all the letters in the NT, only Hebrews and 1 John lack the typical opening expected in a Letter.  Why does the author remain anonymous?

It is possible the letter was not anonymous in the first place, but the address was lost early in the history of the letter. Perhaps the original document was intended to be delivered with a cover letter from the author which was customized for various synagogues or churches in Rome.  Since the cover letter was unique to the church, it was not copied in the same way the letter might.  But there is no evidence for this, either by manuscript or tradition. It is better to see the letter as intentionally anonymous.

It is also possible the letter was anonymous to protect the writer from any attacks from either Jews hostile to the gospel or Romans wishing to persecute the leaders of the church.  Some scholars have pointed out that the Gospel of John does not identify every disciple (there are unknown disciples throughout the book).  At least one explanation for this was to protect these still-living disciples from persecution.  But this would seem odd for the author to hide his identity given that the letter encourages the readers to face persecution with boldness!

It is more likely that the letter was likely intended to be read in a number of different contexts as a literary piece, not a letter written for a particular occasion.   Hebrews is a sermon addressed to anyone struggling with the relationship of Judaism and Christianity, although it is especially applicable in Rome in the early 60’s.  An introduction with greetings from the author may not have been appropriate, if this is the case.