Returning the lastrowid is a pretty common operation to use the `id` inserted in another table as a pointer to the already inserted row. That's what being done in here too.