It's usually from the flight number, as you've seen, but sometimes that conflicts with others.. (at LHR, BAW55, BAW155 and BAW115 used to depart within a few minutes of each other....)..and might cause confusion. That's why some are altered to alpha-numeric.
Other airlines have different systems. Midland have BMAxHY LHR-EDI, and BMAxEH EDI-LHR.