It's not "similar" to ammonia - it IS ammonia.
Actually, the ammonia binds with the inadequate level of chlorine and creates chloramines. This is one common cause of eye irritation. The solution to a buildup of chloramines is breakpoint chlorination, AKA "shocking" the pool with a high concentration of chlorine.