First up, no, these were not malicious rejections.
Two of the three cases were title edits that didn't change how closely the title matched the content of the post. While good grammar is preferred, just fixing grammar when the original is clearly readable and the OP's intent is obvious is a trivial edit. I've made a lot of edits since I started here, and I try not to edit grammar unless I'm also making substantive changes to the OP's text (such as adding information posted in comments to make it more visible, reformatting lists, rearranging information to make the actual question stand out more from the explanation, and so on).
The reasons I don't edit grammar or spelling - even when the grammar/spelling makes me cringe - include how easy it is for an apparently basic grammar change to change the meaning of a sentence. In addition, the grammar rules are different between American and British English (not by much, but there are differences). There are even bigger differences between other English dialects, including using indefinite articles where American and British English speakers would not.
When I see an edit that's solely a grammar/spelling edit, I read the original without edits. If the OP's meaning is clear despite any grammar/spelling issues, I reject the edit. If the edit is to a title, I check whether the original is clear and whether it accurately reflects the nature of the question. If both are true, I reject the edit.
Third case was a bit more challenging. Without more information, there is a possibility that the apparently superfluous imports could prove significant. Had you not removed the imports or changed the package name, I would have approved that one because you did improve the code formatting.
For code edits, I look for the original code all being present, and formatting improvements. Your edit didn't meet the first criteria, but met the second. Perhaps in that case I should have improved on your edit by putting back the original code while keeping your formatting.
I am sorry you believe the rejections were malicious. They were not - it was simply unfortunate that you had a set of edits that did not meet the criteria I use when I'm moderating edits.