This uses the extended syntax of the SET
command.
set "varname=content"
The quotes are before the varname and at the end of the content, this avoids in
unintended white spaces, as anything after the last quote is dropped.
As long as there are no quotes, ampersands or pipes after the last quote, it's can be used for comments.
Your example <nul set /p="="
causes a syntax error, because it starts with an equal sign.
It should be <nul set /p"="
, then it works as expected.
The <nul set /p
syntax can be used to output text without a line feed. But in this case, nothing will be printed, as there is only a single equal sign without any text to output.