It seems very purposefully positioned, but shoddy work. I’m wondering if it was to brace up a sag in the roofline. In other words, removing it might cause you a problem even if the whole roof doesn’t collapse. Seems like it would be safe to move it to the other side of the lighter beam, or right up against it. I would put one on the other side of the opening as well so as not to recreate whatever original problem that was trying to fix.