Because it is legal syntax.
Indeed it is.
When you create an object using the object initializer syntax, you can leave a trailing comma after the last element, even if you end there with an initialization block.
Probably the reason is that it makes it easier to return and edit later, because it forgets to add a comma after the previous-last element is a compilation problem # 1 with object initializers.
source
share