Note: these are not PDB files. They are distributed by the PDB organization, but the file format is mmCIF (or, more formally, PDBx/mmCIF).
You can check specification of pdbx_seq_one_letter_code and pdbx_seq_one_letter_code_can. These items are generated from the depositor-provided sequence on the PDB side. I suppose that the software used is MAXIT.
Note: these are not PDB files. They are distributed by the PDB organization, but the file format is mmCIF (or, more formally, PDBx/mmCIF).