Good question.
The first law with those terms is just a subset (special case) of the law of conservation of energy (which technically is a special case of the law of conservation of energy-matter). If we assume matter is not being converted to or from energy, then energy is conserved, and matter is conserved.
Some laws can be broken by introducing things that aren’t included (things assumed during the law’s statement to be held constant, or even stuff that hadn’t been discovered when the law was first formulated). Also, the sign for work is sometimes a convention. Usually we have to just work-out which way the energy flows.
In the case of the block, it is losing kinetic energy and it is breaking bonds in the matter comprising the surface, bonds that hold negative energy, and also heating-up both block and surface. Like bending a bar takes work, and so it puts energy into the bar; the bar has more bond energy (sometimes called cold working) than before it was bent.
We tend to think of friction energy as just disappearing, but it does go somewhere, usually in bending or breaking and/or generating heat.
Same logic applies to conservation of momentum. The block loses momentum and it may seem like it disappeared, but the earth/table/block system still has the same total momentum. The earth (excluding the block) now has a drop more rotation and/or translation after stopping the block.