The clause after the second comma (surely . . .) is actually an independent clause. You can tell because it doesn’t start with a subordinator or function as a component of another clause. Surely they would not have left it to rot here? is perfectly grammatical as its own sentence.
The if clause may be traditionally considered a dependent clause with subordinating conjunction if, though modern grammar classifies this conditional marker as a preposition, making it a prepositional phrase. Either way, I’d argue it is attached semantically to the second independent clause (the question) and not the first. (It’s at least more likely given the phrasing to be tied to the second, though it might be best to clarify intended meaning.) My answer will operate under that assumption.
What you have here is a comma splice: a comma incorrectly joining two independent clauses (Keith did not . . . and surely . . .) on its own. To make it correct, the first comma would have to be replaced by another punctuation mark that can legally join independent clauses. Or you could add a conjunction/preposition, though that might make the sentence unwieldy. The comma after the conditional should ideally stay since the phrase is rather long and placed before the subsequent independent clause. Thus, these are your options:
A period is always a safe choice to separate independent clauses. But I’d say the two ideas are closely linked enough to warrant being one sentence.
Keith did not know what to make of this apparatus. If it was meant to transport heavy goods, surely they would not have left it to rot here?
A semicolon can join two independent clauses into one sentence without a conjunction. I think this works the best because it establishes that the two express complementary ideas.
Keith did not know what to make of this apparatus; if it was meant to transport heavy goods, surely they would not have left it to rot here?
A colon could work here as well because the latter part of the sentence serves to further explain why he was confused.
Keith did not know what to make of this apparatus: if it was meant to transport heavy goods, surely they would not have left it to rot here?
Em dashes can also connect two independent clauses, though the use of one might not completely fit here, as they usually express cases of significant contrast or emphasis.
Keith did not know what to make of this apparatus—if it was meant to transport heavy goods, surely they would not have left it to rot here?
Finally, if you would rather add an additional word than change the punctuation, you could add a casual preposition like as, because, for, or since to the start of the second clause, turning it into a prepositional phrase. (Traditionally for is classified as a coordinating conjunction and the others as subordinators, but much like if they are now often considered prepositions. Doubtless there are myriad analyses of this on this site.)
Keith did not know what to make of this apparatus, as/because/for/since if it was meant to transport heavy goods, surely they would not have left it to rot here?