DML statements should not be executed in class constructors, https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_static.htm[instance initialization code blocks or static initialization code blocks] for two reasons:
* It is counter intuitive. Developers will not expect the instantiation of an object to modify records.
* Constructor and/or initialization code blocks of VisualForce controllers will fail if they try to execute DML statements. This is also true for indirect calls to DML statements: they can't instantiate objects which execute DML statements in their own constructors/initialization code. Having to check if a constructor can or cannot be called makes development more complex.
This rule raises an issue when a class constructor, an instance initialization block or a static initialization block executes a DML statement.