Why does a sticky piston powered by a redstone block through another sticky piston from the top not contract? [duplicate]
Solution 1:
You are experiencing quasi-connectivity. You have actually produced a BUD (Block update detector).
The power source is the redstone line above. I have built an example to demonstrate.
Here it is unpowered and then powered(but not updated):
Here I updated the block by adding glass, then removed glass and power:
Here I removed all the remaining blocks and it still doesn't update. Then updated it with glass again:
Note: There is a sandstone block next to piston. I removed that when piston was powered. Unpowered would have updated piston and it would have retracted.
Unfortunately you will have to go with a different circuit design. One possible change would be to use direct power instead of inversion of the signal to invert all the torches. Run a line directly behind/next to pistons.
Here is an example:
If you want to understand how it is being powered in this way, the wiki has a tutorial on quasi-connectivity.
Solution 2:
This seems to be caused by the famous bug MC-108. If you turn off the redstone line, the pistons first stay extended, but when you then place a block next to one of them, the line retracts. That's because the pistons are powered if the block above them would be powered, but that information doesn't affect them until they get a so-called "block update", which is sent when placing, breaking or changing blocks next to them.
This is not a property of redstone itself, it only affects pistons, droppers and dispensers. It also does the opposite: If you power the block above a piston, it doesn't extend until you update it.
There are different opinions about this bug, some abuse it to make circuits compacter, but it's very confusing for new redstoners, for example you. Personally I find it sad that it is in the game so long already. Whenever it gets fixed in the future, people abusing it will get upset, because they rely on it.