Government's tax arm wrote off nearly £13bn in revenue last year.