The question, “Does market structure determine firm behavior, or does firm behavior determine market structure” can be answered in many ways for the real answer is not necessarily black and white. In situations where multiple firms compose the market, such as in perfect competition, the actions of one firm can seldom be so profound as to effect the structure of the market. In a perfectly competitive market for tomatoes, with 400 different sellers, each of whom holds an equal percentage of total output, it can be easily seen that one firm raising or lowering prices would have minimal effect on the actions of any other firms in the market. The firm, composing only .25% of the total output of the market, would be hard pressed to make a decision that did not negatively effect its financial status. Raising prices would raise their price above equilibrium meaning fewer people would buy, given 399 cheaper options, still selling at equilibrium price. Lowering output, would also have a negative effect on the firm, as would lowering prices. Long story short, given a multitude of firms acting independently of each other, the decisions of a firm would likely have minimal effect on market structure.
With that being said, the situation is rather different when it comes to markets in which only a few firms comprise the whole of the market, as with oligopolies, or when only a single firm is present, as is the case with monopolies. Using tomatoes as an example again, suppose that only three firms existed in the market for tomatoes, and each held a third of the output of the market. In this situation, it would be very simple for the firms to examine the behavior of the other two firms and thus make monumental shifts in the market when the pieces aligned correctly. It would also be easier to collude with only three firms, which would be very difficult in the presence of 400 different firms. While illegal, within the United States at least, collusion among three firms would be simple and easy to hide. The end result would be the presence of a single, self serving entity that could manipulate, through price gouging and other techniques, the market for tomatoes. Hiking up prices simultaneously would be simple and if each firm followed the agreement, the concept of competition driving down prices would be nullified and the end result would be an overly expensive tomato. The same is true for monopolies, which, although not illegal, can set prices at whatever they see fit, and thus control the market without fear of interference, or competition.
After all is considered, it is very easy to see there are situations in which markets determine the behavior of firms and where firms determine the structure of markets. Neither argument is wrong, given correct pretext.