The bird ate the pie and it was ruined.
Who is "it"?
the pie