Short answer to how to make the armature rest postion: delete all bone constraints.
The bone constraints are the reason that the armature, with cleared transforms on all bones, is not in the rest position. One example of this would be MCH-upper_arm_ik_target.L , which has a copy location constraint targeting hand_ik.L -- but the rest position of hand_ik.L is not the same rest position as MCH-upper_arm_ik_target.L , so that is one (of perhaps multiple, I don't know) ways in which the untransformed position of the bones is different than the true rest position of the bones.
How did this happen? Probably, you transformed one of those bones in edit mode. Possibly, you created the constraint.
This looks like a rigify armature. How can you avoid this happening when using a rigify armature? Rigify rigs are designed in a way that any edits to the armature need to happen on the meta-rig, after which the main rig can be re-generated. Rigify armatures are not necessarily designed to be edited directly. You can edit them, but you have to know what you're doing, and even then, it's not really recommended, because those edits won't remain after you re-generate the rig from the metarig.