> ...
the data that I pass in should be immuatable data.
But it's not. Either the driver or the server will mutate the data to add an _id field. If you want to control that mutation yourself you can, but any document inserted into the server will be mutated to add an _id field if one does not exist.
There is also an advantage to this design. Since the document is modified on insert, if the insert fails due to a brief network issue or replication failover you can retry the insert attempt. If you get no error, then the original attempt failed and the second attempt succeeded. If the second attempt fails with DuplicateKeyError, then you know the original attempt succeeded.
Regardless, this behavior has existing as long as PyMongo has existed. To change it now would break the expectations of all existing applications.