Can a purely declarative language really exist?
Declarative programming defined the goal, as in your example transform A to B, where steps made are not present in this layer of abstraction, and simply it is not enforced.

Imperative programming defines steps to achieve the goal. With optimizations it is a bit of mixture of both - steps are defined but this is translated to goal and then changed to make it faster.

To achieve exactly imperative in this pure form all optimisations need to be suppressed, branching does not change the order. Interpreter executing one instruction at the time does that already.

As far as I know we call languages like C, Fortran, Pascal, assembler imperative languages and do not go into details of execution. One example is read from disk 1bit, 1 byte, several bytes and so on - disk reads the whole batch at once so it did not exactly what we asked for, the same with access to memory.

The side effects are not declarative, but imperative. Purely functional language is declarative already. The problem with purely functional language is e.g. I/O, which is mittigated by monads, to set states, but it does not matter to declarative one.