A simple Google search of this will yield pretty consistent results. There’s a growing consensus that on most forms, the majority of fields are required, and only a few are optional, and that only optional (not required) fields should be indicated as such.
According to the research I found, this seems to come from back-in-the-day when we used to use paper forms. (Paper was a very thin and flexible material made from the wood of trees, and was used for recording and transmitting information due to its light weight and ability to store ink.) During this time, it was assumed that every question was required unless indicated otherwise.
Therefore, the research concludes it is best to leave required fields unmarked, while providing a text indicator, such as the word "Optional", for the fields that are not required. Textual indicators are more accessible than symbols or icons, which cannot be translated, and whose meanings are not immediately apparent.
It seems that the reason you might typically see the exact opposite in the wild is due to HTML code. <input/>
elements are optional by default; it’s only until you add the required
attribute that they become required. In the world of HTML forms, “requiredness” is opt-in. This coding convention seems to have carried over into design. Maybe because CSS allows you to do this:
input[required]::after { content: '*'; color: red; }
Maybe that’s not always a good thing.
Here is some reading material: