Auto-translated
Qwerty has already answered some of the questions; I will clarify the remaining ones (although each rule has already been discussed on the Portal, it just needs to be found).
1) Why is it allowed to redeem a hero who has fled and use them again, but it is forbidden to attack an opponent or a neutral creature after redemption?
Attacking is prohibited because it led to an endless hit-and-run tactic (until the money runs out). If an enemy approaches your castle with an army, and you attack with a fast unit, cast spells, redeem the hero, and repeat (and each time, the hero has a full movement range after being bought), this is the main reason. Also, in offline mode, you could simply dismiss the hero and immediately "resurrect" them in the Tavern (instead of having them attack someone who might not even be within a couple of turns of the hero). This is what is prohibited in offline mode.
In online mode, attacking is only prohibited (to avoid the "endless" hit-and-run), but it is allowed to redeem and use heroes again for the following reasons: I once played on the "Seven Lakes" map against a Necromancer, and unexpectedly, he rushed towards me with powerful stats and an army. I had artifacts on two different heroes, and since it is not allowed to dismiss and redeem a hero immediately, as in offline mode, I could only find monsters for the heroes to attack the day before the attack. So, I had both heroes attack, but I could only take the artifacts from one, because otherwise, I would have to move the second hero out of the castle, which was forbidden at the time. And it often happens that you need to attack a hero with an army guarding the castle and another hero, the main one, from another location with artifacts, at the same time. Plus, in online mode, redeeming and attacking heroes is one of the game's strategies (since town portals are prohibited), and both players can use it equally (especially considering that the games are usually played on maps with similar starting conditions), which diversifies the game and makes the overall strategy more interesting.
2) Regarding the Demon Cave: there are maps (like "Hot Spot") where the 2500 resources given in this cave are very useful, and the elementals also need to be defeated. A powerful artifact can only be obtained by refusing to fight, which is why it was agreed that you can enter the cave, but you must fight.