The original authors are long gone, and the code is difficult to understand. It can be tempting to rewrite from scratch rather than spend time learning the existing code. But instead of thinking “I don’t get it” and ending your thoughts there, dive deeper: what questions should you be asking? Consider the principle of “Chesterson’s fence”: before removing or changing something, first understand why it’s there.
The original authors should have heeded the Beyoncé Rule. I.e., if they didn't want a fence removed, they should have had a test to protect it 💍(and documention, and a bug with details to point to 😅)!
For real, though; I agree with this. I've seen too often change things without even trying to understand why they are the way the are. One example is back button behavior. A frequent problem and just a frequently angsted over because there's often no perfect or right answer. People will seek out to get the behavior they want without considering the trade-off that was previously found to be the least bad.

