why is transformer not considered as an amplifier?
It's just a subtlety of the terminology. If there's no (capability of) power amplification, then we don't call it an "amplifier" even though the output voltage might be higher than the input voltage.

As others have pointed out, there are other functional differences between transformers and amplifiers, one being that power can flow both ways through a transformer but generally only one way through an amplifier.

Finally, we already have a word for a device that can change voltages without providing power gain, so we don't need to call these things amplifiers. We can just call them transformers.