Well, productivity measures how fast you deliver new value. Fixing a bug is about repairing value that you thought you had delivered but actually did not. Counting bugs as "value" would be double counting.
> Fixing a bug is about repairing value that you thought you had delivered but actually did not.
In that case it's important to classify issues correctly. Email sending worked yesterday but not today because Office365 changed some SMTP requirements (say ciphers)?
Customer will call it a bug, but according to your definition it should be classified as a feature.
That's a problem because sometimes fixing bugs brings more value than adding a new feature or optimizing something.