Actually in most cases a third party manufacturer (Foxconn for example) builds the cards based on nVidia's reference design (PCB, component selection for power and memory, and cooling solution). These are then packaged up and sent to nVidia's or ATI's AIB partners (AIB=Add In Board) where they place their stickers on them (branding and serial numbers) and put them in there branded boxes with there own selection of accessories (cables, adapters, case stickers etc) and these are shipped to retailers / e-tailers. These cards are essentially exactly the same.
This isn't the case for specialty (read high priced) cards that AIB's may produce. Some are simply reference cards that have been binned/qualified to run at higher clock speeds. Some are complete redesigns with cherry picked GPU's and faster memory. The latter cards usually include beefed up cooling solutions as well. The price is dictated by how far the card deviates from the reference, with the deviation paying dividends in performance. Usually these dividends are a case of diminishing returns, meaning the user gets less and less performance increases for his money.