As I know from Thermodynamics work done by the system is negative
and equals to $U=Q-W$.
$W$ in the equation is always the work done by the system. That work can be either positive or negative depending on whether work results in energy leaving the system, in which case $W$ is a positive number, or entering the system, in which case $W$ is a negative number.
When you say that work done by the system is negative you seem to be confusing the minus sign preceding $W$ with the sign of the value substituted for $W$ in the equation. The combination of the two signs determines the affect of the work done by the system on the change in its internal energy, in the absence of heat.
The sign given to the value substituted for $W$ in the equation $\Delta U=Q-W$ is consistent with the fundamental definition of work in mechanics:
$$dW=\vec F\cdot d\vec s\tag{1}$$
Where $d\vec s$ is the displacement of material at the point of application of the applied force $\vec F$.
For a piston of uniform cross section area $A$, uniform gas pressure $P$, and piston displacement $ds$ we have $F=P/A$ and $ds=dV/A$ (see figure below) which gives us the familiar equation for differential boundary work for a closed system in thermodynamics of $dW=PdV$.
The dot product in equation (1) gives us
$$dW=Fds\cos\theta$$
Where $\theta$ is the angle between the force and displacement vectors. If the force is in the same direction as the displacement, $\theta = 0^0$, $\cos\theta =1$ and the work done by the force is positive. If the force is in the opposite direction of the displacement, $\theta = 180^0$, $\cos\theta=-1$ and the work done by the force is negative.
The concept of positive and negative work is easiest to visualize in your first example in which the system does expansion work by removing pebbles from the surroundings (reducing external pressure) . A small (differential) amount of expansion work is shown in FIG A below. Note that the differential displacement $ds$ of the piston is in the same direction as the force applied by the system (gas) on the piston, meaning the system work is positive. When something does positive work on something else it transfers energy to that something else. In this case the system (gas) transfers energy to the surroundings. $W$ therefore is assigned a positive value. Combining this with the negative sign in the first law equation reflects the fact that energy is leaving the system in the form of work. Note that it is equivalent to say that, in FIG A, the surroundings is doing negative work on the system, as the surroundings obtains energy from the system.
Since the system plus the surroundings constitutes the universe in thermodynamics we can say, in the absence of heat, that the work done by the system on the surroundings is the negative of the work done by the surroundings on the system.
In FIG B pebbles are added to the piston resulting in compression. Now the displacement $ds$ is opposite to the direction of the system force giving us a negative value of $W$. When something does negative work on something else it receives energy from that something else. In this case, the system receives energy from the surroundings. Once again, we can equivalently state that the surroundings does positive work on the system.
Work done by the system in example 2 (adiabatic compressor) is negative resulting in a positive enthalpy change since there is mechanical energy input to the system, whereas the work done by the system in example 3 (adiabatic turbine) is positive resulting in a negative enthalpy change as there is mechanical energy output from the system.
Hope this helps.