No transaction may execute lock(A) if it has already done so.

No transaction may execute lock(A) if it has already done so.

I don't understand why we need to say this. If you look at the other rules,
it seems superfluous, doesn't it?

Let me repeat: No transaction may execute lock(A) if it has already done so.

The five rules are:

Each transaction must execute lock(A) before the earliest execution of
read(A) or write(A).
Each transaction must execute unlock(A) after the last execution of
read(A) or write(A).
No transaction may execute lock(A) if it has already done so.
No transaction may execute unlock(A) unless it has already executed
lock(A).
Regardless of database items, all lock operations must precede the very
first unlock operations.