The avoid unnecessary command linting suggestion for /replaceitem does not take into account use cases which are not achievable in script apis such a setting equipment on non player entities.
/replaceitem allows creators to set equipment slots on any entity, ie /execute as @e[type=minecraft:zombie] run replaceitem entity @s slot.weapon.mainhand 0 iron_axe meanwhile non-player entities do not have the equipable component accessible.