How mysql binlog position generate?
The binlog position is the byte offset into the current binlog.  So, the pair of binlog filename and pos uniquely identify the location in the virtually unlimited binlog.

The GTID (if being used) also provides a unique location, but it is not "offset" based.