This is done by `ack` itself. `ack` checks if its standard output is connected to a terminal, and if it isn't, it prints output in a different format. I guess this format was chosen because it is more easy to process by applications designed for text processing (like `grep` or `ack` itself).