I have a problem understanding workplace politics. I usually google these questions. However, this is one scenario that I couldn't find an explanation for.
Disclaimer: I'm not exaggerating when I say that I'm inexperienced when it comes to practical professionalism. I've worked jobs in the past, ranging from customer service to office jobs. Most of my knowledge and application, however, comes from reading books about professionalism and how to work in teams. It seemed to work up to a point.
Background: I joined a team as a junior software developer for just over a year now. I've done my best to lead with my best foot - spending time to study their codebase and architecture, learning the tech stack, being cordial to teammates, being positive, persisting on problems even when they are challenging. I've improved in many ways on the technical side. There are also aspects that I still need to improve on and I have them in my personal development plan.
On the other hand, my interactions with my teammates have been strange and unstable. I often feel like I'm being personally tested for my character (is this normal?). One week, I'm treated as part of the team; the next week people ignore my questions altogether (even when I approach them one-on-one). I figured they were swamped, so I've largely been teaching myself from documentation, google, advice from devs who work outside of the company, helping new joiners with on-boarding because the docs can be scattered and inaccessible (also I can learn while I teach), etc. I've tried to keep a consistent demeanor as well when interacting with them. Aside from code review, however, I haven't received any feedback for professional improvement even after asking for it. I can tell that I don't fit the culture here and that many of my coworkers don't really see me as valuable, so I'm working to leave.
Recently, the testy behavior took on a different level. A recruiter contacted me and I responded that I'm looking to apply for jobs in a few months from now. Now, several people on my team are passive aggressively hinting at not hiring people who are like me again (this was verbal and in front of the team). Also, I suspect I'm under investigation for some reason because one of my earlier features was picked up by a different teammate, but the questions they're asking regarding the work done are borderline interrogative. For example, instead of asking questions about the feature itself like "why choose to implement that part this way?" I was being asked questions about who asked whom first for help when I collaborated with another person. I haven't received a memo from HR.
On a separate occasion, I logged into my work machine to find logged messages of some one attempting to bypass my credentials (I've reported this to IT securities). I've already asked my manager's manager whether the company does things like monitoring (including after hours) and he categorically denied any monitoring, key-logging, etc. Since then, I've seen and recorded several signs pointing to the opposite. Not only that, but I suspect that they monitor their employees 24/7 (I recorded attempted hacking that looks like it came from IP but I wasn't home and my machine was shutdown, doxxing, monitoring internet activity of my household). I'm thinking the team is preparing a case to dismiss me before I quit.
Conclusion + questions: I'm not really sure what to make of all of this. Why would they be upset that I'm leaving if I'm not considered valuable and they're constantly hiring talent? Shouldn't they be happy/relieved instead? Also, what kind of reaction is that to someone who is quitting? Is this common among corporate team cultures? Am I missing some unspoken rules about how work interactions are supposed to go?
Thank you in advance.