Salesforce includes certain fields in a query, even when you don't ask for them. As a simple example, consider:
Account record = [SELECT Name FROM Account WHERE Id = :someRecordId]; System.debug(record); You might expect to see:
(Name=Account Name) However, that's not what happens. Typically, you might see something like:
(Name=Account Name, Id=001xxxxxxxxxxxxYYY) Or:
(Name=Account Name, Id=001xxxxxxxxxxxxYYY, RecordTypeId=012xxxxxxxxxxxxRecordTypeId=012xxxxxxxxxxxxYYY) Etc...
In fact, the returned object from a query might include fields depending on the runtime API version, the API version of a compiled class or trigger, whether or not specific features are enabled (e.g. having multicurrency enabled may return CurrencyIsoCode), the type of request (API, Visualforce, Lightning, etc), and so on.
Do not assume that the query you write will return precisely the data you request. At minimum, the Id field will always be added to a query run in Apex. Instead of using a record from a query, you should generally consider creating a new record in memory and explicitly setting just the fields you intend to use.