@mkaanztrk, so there are several things I found in your file, so let me walk through them one by one. Spoiler alert:
testanim_fix.zip (3.7 MB)
testAnim_glbExport.zip (2.0 MB)
The first thing I found in your file is that your mesh is not at world zero, but is offset in space with your transforms frozen:
You can see the local and world offset for your pivots baked into the mesh. This is what is causing the problem. We are loading the file at world zero, since your frozen transforms are at 0, but your pivot offset is being applied to your rotation animation because the transform has this offset in the file.
What I did was to bring the mesh back to world zero to eliminate some of the offset in the pivot working under the hood. I also reset the transforms and noticed that your original transform was baked into the bottom left of the door as seen from the outside, so the original transform was making your door swing from the opposite side and swing into the basemesh, not opening away from the basemesh. This is the mesh after the unwinding of the baked pivot:
But you can see that there is still some offset in the pivot. This will cause trouble with node animation as the glTF does not have a sense of the history of the mesh. We do translate these pivot offsets, on a mesh that has a big history, even when deleted, can keep remnants of the original positions with the pivot offset.
To combat this, I dropped a locator in the scene along the pivot axis of the door and applied the rotation animation to that mesh with the door set as a child to the locator. The locator will export as an abstract mesh that has a transform and can be animated. This bypasses any baked history of the door mesh so that the node animation plays correctly:
While this is a solve that works for this model, I think a better workflow would be to skin the mesh to a simple two-bone skeleton. You can rigid bind the root bone to the basemesh, and then rigid bind the test mesh to a bone sitting at the rotation axis of the door. Then you animate the door bone to open and close. This is better because it is the offset of the bones from the root that determine all motion rather than relying on animations on separated meshes keeping relation to one another when in motion.
Other than that, there were some issue with your normals (a lot of glTF validation errors) as well as vertices with no UV assignment. I did some mesh cleanups, but there are still more issues, likely in vertices overlapping one another. I did a quick automatic UV unwrap as well so I could get the mesh rendering correctly in the sandbox. But there were some normal conformity issues as well with parts of the basemesh having reversed normals which I manually corrected. There is likely more cleanup to do as the triangulation seems to have created a lot of unnecessary faces:
I hope this at least helps you get going in the right direction, but feel free to ping me with other questions.