hashing algorithms are designed to be "trap door" functions. That is they are designed to work only one way.
A
Trapdoor function is not the same as a
One-way function. The difference is that with a trapdoor function, there is some secret which, if known, allows you to compute any inverse you want of the function. If SHA-256 was a trapdoor function, it would mean that someone who knows its secret would be able to find blocks effortlessly.