In the (raw) DNS zone file, the value of a TXT
record needs to be enclosed in double-quotes if it contains spaces (as is often the case with SPF and DKIM records). Spaces are otherwise delimiters in the DNS Zone file.
RFC 1035 defines how values should be quoted in the Zone fine. With regards to TXT
resource records:
3.3.14. TXT RDATA format
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
/ TXT-DATA /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
where:
TXT-DATA One or more <character-string>
s.
[Page 20]
<character-string>
is expressed in one or two ways: as a contiguous
set of characters without interior spaces, or as a string beginning
with a " and ending with a ". Inside a " delimited string any
character can occur, except for a " itself, which must be quoted using
\ (back slash).
[Page 35]
However, as mentioned in comments, you often use another tool to edit DNS records (you don't usually edit the DNS zone file directly, although WHM does give you this option). This other tool will probably handle the quotes and any additional escaping that is required to make the record valid. If you manually surround the value in quotes when submitting the value using your editor/tool then these additional quotes might be escaped and become part of the TXT
record value.
Incidentally, when you do a DNS lookup, you are seeing the parsed/unquoted string value.
Further Reference:
https://en.wikipedia.org/wiki/TXT_Record
https://www.rfc-editor.org/rfc/rfc1464