I think the Acad document/properties window/.NET API on Table class is ambiguous, to say the least, or quite confusing.
Style is different from RowType. From the API, you do not see method/property that you can use to set "Row Style" as you do with Properties Window.
OTH, there are only 3 row type:
Title: can only be the first row;
Header, can be the first or second row;
Data: can be any row.
That is, the first row can be any type of row. But if you set it to Header type, then the second row can only be Data type. If you set it as Data type, all row below can only be data;
The second row can be header only when the first row is Title type.
Any rows from the third row can only be Data type.
However, when you use Properties Window (pay attention here, it is "Row Style", not "Row Type"), in the "Row Style" you set a row, say, the third row as in your example, as Header, instead of changing the row type (remember, the third row here can only be Data type), AutoCAD applies the style associated to the header (set in the current TableStyle) to the row.
You can try to set "Row style" in the Properties Window to Title or Header to the differnt rows and run your code see the result as I described in the beginning.