Just to add the default param value for inserting is INDEX_NONE (-1), so internally it may be doing some logic based on if it gets an index value greater than that or not.
Likely defaults to adding to the end if -1 else will insert at the specified index if valid.