Electricity flows through a conductor, such as a wire, by means of a flow of electrons. When a bird sits on a power line, its body is not in contact with the ground, which means that there is no complete circuit for the electricity to flow through. The bird's body is not a good conductor of electricity, so the electrons cannot flow through it. Instead, they flow through the wire, bypassing the bird's body.
To understand this better, consider a simple circuit consisting of a battery, a wire, and a light bulb. When the wire is connected to the positive and negative terminals of the battery, a current flows through the wire, and the light bulb illuminates. If the wire is broken, the current cannot flow, and the light bulb will not turn on. Similarly, when a bird sits on a power line, its body does not provide a path for the electricity to flow through, so the current passes through the wire instead.
It's worth noting that power lines can still be dangerous for birds. If a bird touches two wires at the same time, or touches a wire and the ground simultaneously, it can create a complete circuit and the bird may be electrocuted. Additionally, power lines can be hazardous for birds in other ways, such as by obstructing their migration routes or attracting predators.