Yesterday, I answered the same question in StackExchange:
How to upload document and update properties in one go using C#
Actually, this is by design.
Using Update() method, Version1 is to create the uploaded file item and Version 2 is to update the metadata column.
Using SystemUpdate() method, it won't update Editor field and generate the new version history, it will set the Editor field with Current Logged User.
A workaround is to open the SPSite with a UserToken which is the same as the value which needs to be set with Editor like this:
SPSecurity.RunWithElevatedPrivileges(delegate()
{
SPUserToken token;
using (SPSite site = new SPSite("http://sp/sites/dev/"))
{
token = site.RootWeb.EnsureUser(@"i:0#.w|contoso\jerry").UserToken;
}
using (SPSite site = new SPSite("http://sp/sites/dev/", token))
{
using (SPWeb web = site.OpenWeb())
{
Byte[] bytes = File.ReadAllBytes(@"C:\passwords.txt");
SPFolder myLibrary = web.Folders["DocVersion"];
web.AllowUnsafeUpdates = true;
SPFile spfile = myLibrary.Files.Add("pwd.txt", bytes, true);
spfile.ListItemAllFields["Title"] = "TestTitle";
spfile.ListItemAllFields.SystemUpdate();
web.AllowUnsafeUpdates = false;
}
}
});
Then it will only generate one version like this:
This workaround needs to make sure the User in UserToken have enough permission for the site and library.
Reference: