Why this transaction is valid? The before transaction is @ https://www.blocktrail.com/tBTC/tx/da58f6688b0727a7f1bf3eec899099bde1f18b9c7099f9d2c79556db238e623d

Its output script is "OP_HASH160 da1745e9b549bd0bfa1a569971c77eba30cd5a4b OP_EQUAL".

The current transaction is @
https://www.blocktrail.com/tBTC/tx/839b903b9f79c3372792ceb95917047c46d1b919ed1f6471f5a19d7c865ab32c?txinIdx=0

Its input script is "51". 

I verified the transaction manually but it failed.
Why the transaction was accepted and confirmed?

The evolved stack is as below. What's wrong?
628850cb844fe63c308c62afc8bc5351f1952a7f = RIPEMD160(SHA256(1))
The transaction is valid. This golang code gives the correct result.

You need to HASH160 51, not 1.

Additionally, make sure you run the hash on 0x51, not "51" or int(51).