If we have the following variable declaration:
List list = new List(5);
Why does this:
list.insert(2, 3);
Because insert assumes that the list actually has that many items already inserted- capacity is not the same thing as size. Initializing the list with a given capacity just sets the size of the internal array- it is an optimization to prevent array resizes when you know the number of items that you are going to be inserting.