Given that Josef K. didn't know exactly who was even summoning him or on what basis they were doing so, why did he cooperate? What would've happened if he had simply refused to go along with the whole proceeding (like Hank Rearden did in Atlas Shrugged)?
I know this has been already answered, but this is my interpretation of why K. repeatedly went to the summons. K. is holds his reputation above all else and his fear that he may be deemed guilty and there after looked down upon by others gnaws at him. He tries to pretend that he doesn't care when in reality this scenario is making him go paranoid. K. is a man that will always try to solve a problem if a solution is apparent which we see throughout the novel. Each time his trial seems helpless, he is fed a little bit more information and regains hope that by one mean or another he can put this trial to rest. In this way, the Trial drives him mad.
If he did not show up at the proceedings nothing would have likely occurred. The story the priest tells K. near the end of the novel represents K.'s own life. The doors upon doors represents K.'s life and he is causing himself to be stuck at the first door because of the words the guard who represents the Law.
Kafka didn't technically finish the book, but it's worth noting that at the ending, Agents executed Josef K.
This suggests that whatever agency was doing the prosecution had at least some capacity to act. Unfortunately, due to the fact that the novel isn't complete, it's not clear exactly what happened to cause that to happen (other than Josef K. being told by a priest that his trial was going badly).
While we can't know exactly what precipitated his ultimate execution, Josef K. learns from Titorelli (a court sketch artist) that it's essentially impossible to be acquitted. Wikipedia summarizes their meeting as follows:
Titorelli turns out to be an official painter of portraits for the court (an inherited position), and has a deep understanding of the process. K. learns that, to Titorelli's knowledge, not a single defendant has ever been acquitted. He sets out K.'s options and offers to help K. with either. The options are: obtain a provisional verdict of innocence from the lower court, which can be overturned at any time by higher levels of the court, which would lead to re-initiation of the process; or curry favor with the lower judges to keep the process moving at a glacial pace.
It's not known whether Josef K. had taken any steps to try to cause his trial to "grind to a halt," although it is worth noting that he had fired his lawyer, so he may not have been. (It's very unclear whether the lawyer had actually done anything, though, and we can't be sure about exactly what Josef K. had been doing in the interum with regards to his trial).
These facts seem to suggest that Josef K. would've been convicted and executed had he simply ignored the summons.
The one thing that his participation in his trial does seem to have done is to have "broken" him in some sense, and he offers no resistence when agents come to execute him.
In the beginning, Josef K. appears to hold out at least some hope that he's dealing with people that can be reasoned with. Between that and the uncertainty about what the agency can actually do to him, it's actually fairly natural that he would "go along with" the process (at least at first).
He was awoken, at home, by police. One need only take the narrative on its face. What do you suppose would happen if a Turkish man, in the current situation of that country, ignored a summons? He would end up in one of those back rooms suffering the consequences. Ayn Rand is no realist! Read a page of the Gulag Archipelago, you will learn what happened to such as who ignored summons.
Kafka gives us such a sense of unreality, we forget that life is shaped by the dream of real forces. Although, I don't think Kafka forgot as much.