After digging a bit more into the rating calculation, I think it is normal, while disturbing.
Let me explain.
The new maintainability rating is computed from the technical debt ratio.
“E” is for a ratio greater than 5%.
That ratio is computed from the new technical debt, and the new development cost.
The ratio of a directory, is computed from the sum of the new debt of all the files and sub-directories, and the sum of the new dev cost of all the files and sub-directories.
It means than each file may have a ratio lower than 5% (it can be because the quality is fine or because there is not enough data to compute the ratio, for example if the cost is 0).
But when summing the values and going up on the directory tree, at some point, the ratio goes up, and the rating changes.
You can have more information on the Maintainability metrics on the SonarCloud documentation.