First thing to realize is that there are physical reasons for fainting. Women in that time wore tight corsets, which made it difficult to eat much - and undernourishment can cause dizzyness and eventually fainting. Second, it was impossible for women to take a deep breath as their organs where deformed by wearing a corset. There are moments where one really needs to take a deep breath - when overheated, or when seeing something disgusting, when hurt - and these women just couldn't. The fact that women always carried smelling salts with them indicates fainting was quite common.
But it's not impossible that there were psychological motives as well. One important insight is that women do faint a lot more often in novels by male authors than in for example any novel of the Brontë sisters. It is likely that male authors portrayed women as weak creatures that would fall into a swoon easily, probably because a fragile woman was attractive to men. Novels written in the Romantic Period (1790-1860) were characterized by sentiment and strong emotions. Gothic romances were really popular in the female readership, and it thus is possible that women orientated to their fragile, obedient heroines and draw male attention to them.
Whatever the real reasons may be, fact is that swoons add a lovely bit of drama to a situation.