Sometimes, airlines join groups (called United Airlines and Lufthansa are part of Star Alliance. This means that Lufthansa can sell tickets for United Airlines and United Airlines can sell Lufthansa's tickets.) which all agree to sell each other's tickets. For example, both
Because airlines sell each other's tickets, some flights will have more than one flight number.