To describe the rotation between tow links, why does URDF use Euler Angle instead of quaternion or axis-angle to describe the rotation? Since there might be singularity issue or gimbal lock in the Euler Angle rotation.
Euler angles are easier and more intuitive as a human input and the singularity/gimbal lock issues aren't really a concern for static rigid transforms.
It would be an issue for a moving joint with a 3-degree-of-freedom rotation, like if you had a spherical ball joint or free-floating joint that was actuated. I don't think URDF supports spherical joints at all. It does support a floating 6DOF joint. If that were actuated and controlled then gimbal lock could be an issue, but resolution of that would be delegated to whatever library controls the joint and provides the interfaces to the user.
Libraries that do support actuated control of such joints do use quaternions or similar under the hood. See, for example:
Using Euler angles in URDF to represent rotation between two links primarily serves readability and simplicity in defining link connections in the robot's structure. Euler angles, despite their known issues such as singularities and the potential for gimbal lock, offer an intuitive and straightforward method for humans to understand and specify the orientation of robotic links in 3D.
In operational contexts, such as during motion planning, it's common to use more computationally robust rotation representations like quaternions and rotation matrices from TF2 and its utilities. These representations avoid the problems in Euler angles representation and are better suited for handling interpolations and complex/consecutive orientation calculations. Also, conversion between those representations is safer than conversion from Euler angles (when its singularities really show up in robotics).
I mean that each representation has its own advantages. It makes sense to use Euler angles for the static description of a robot URDF because we can imagine it. Then, at the time when objects move/rotate dynamically in space, we leverage quaternion and rotation matrices to represent frame orientations.