This is due to a variety of reasons which I will detail further down in my answer, but let me first correct a few of the points you raise.
These contracts represent the amount of funds requested by each company, and is essentially their "bidding price" for the services they can provide. NASA then selects companies from those that applied based on their technical & managerial performance, as well as their bid value.In both instances, for CRS & CCDev, SpaceX simply underbid the competitors. NASA is not giving SpaceX a "hard time", rather, SpaceX is bidding what they believe they can accomplish the contract for.
Also, you misunderstand the CRS contracts. They don't state that Orbital Sciences should carry up 6120kg on each of its 8 flights, and likewise, they don't state that SpaceX should carry up 13,140kg on each of its 12. Rather, the agreements state both companies are required to fly up a minimum cargo mass of 20,000kg over their requested number of flights. Therefore, the correct cost/kg value is 80,000/kg for SpaceX & 95,000/kg for Orbital Sciences. There is no downmass requirement, even though Dragon can carry down cargo. If you don't mind reading through dense documents, here's SpaceX's CRS contract.
You also confuse the capacity of Cygnus & Dragon - which are the cargo vehicles which actually berth to the ISS. You're stating the maximum payload of Antares & Falcon 9 to a 200x200km Low Earth Orbit, the rockets which carry both cargo vehicles uphill, respectively. Both the Cygnus & Dragon vehicles weigh a significant amount and only so much can be packed inside.
In fact, both craft are actually rather complementary to each other and serve the CRS program well. Due to the lower power of the Antares rocket, Cygnus was only able to carry up 2,000kg to the ISS per flight, and all of it had to be pressurized - there was no storage for unpressurized items of NASA's manifests. Cygnus also doesn't return to Earth, instead it can dispose of 1200kg via reentry, a capability Dragon does not have. Additionally & crucially, Cygnus is a very large vehicle with a spacious interior, it has nearly 19m^3 of volume. You'll see why this bit comes in useful later.
Dragon on the other hand can haul up & down 3,310kg of cargo. It can also be a mix of unpressurized and pressurized components. A unique selling point of Dragon is it’s the only ISS visiting vehicle that can return significant amounts of cargo back to Earth intact. Sounds great, right? Here's where it falls flat, a bit. Dragon only has a pressurized volume of 11.2m^3. On nearly all flights, Dragon has been volume limited. ISS cargo takes up a lot of room, and actually doesn't weigh all that much. Because of this, Dragon has never been utilized to its mass capacity, its critical constraint is volume. Here's a cargo manifest for CRS-4, showing that Dragon only launched 2216kg uphill.
SpaceX's Cost Advantage
Why SpaceX tends to be cheaper is because they're what is called a "new space" company. Rather than being founded on a traditional corporate structure, they tend to follow a more agile development strategy similar to startup technology companies - Musk himself was one of the cofounders of PayPal.
Flat organizational structure
SpaceX has very little middle management. There's no more than 1-2 layers between Elon Musk and Joe Bloggs, our propulsion intern. In fact, right up to the last few minutes before a launch, any employee can email Elon personally and ask for it to be scrubbed if they have reason to believe launching may be dangerous - he even works in a cubicle like everyone else (check out their offices in this video, although it's getting a bit dated now). This drastically cuts down on the inefficiencies across the company, resulting in quicker communication & less paychecks needed to be handed out. SpaceX is a very lean piece of meat.
This can be contrasted with an "old space" company like Boeing, where a far larger fraction of the employees are in managerial positions, less are engineers and technicians. That's not to say they don't get work done, but it's slower and more costly than SpaceX's approach.
Off the shelf components & vertical integration
Traditionally aerospace has been a game of subcontracting. A launch provider will handle the rocket and assemble the components provided by everyone else, who requested the parts from others. This adds transportation costs and can result in price gouging. SpaceX build the entire rocket themselves. They build their engines, they build their tanks, they build their software, they build their equipment. As Bill Nye said: "Metal comes in one door, rockets roll out another".
SpaceX also ditched the idea of using "aerospace grade" components in their rockets - much to the annoyance of the Air Force & NASA. Check out this album of photos of a washed up Falcon 9 fairing on the Eastern seaboard, you'll see lots of plastic clip ties amongst the mangled carbon fibre. No other aerospace company employs clip ties whatsoever! Often, SpaceX found that the aerospace grade components costs an order of magnitude more and did not deliver much extra performance. Toilet stall handles as Dragon parts, for example.
Modern equipment with no legacy costs
Everything SpaceX operates has been conceived and built in the last 10 years. They've benefitted massively from Computer Automated Design tools and modern technology, embracing concepts such as 3D printing. This makes their rockets cheaper, and therefore their bids by extension. They don't have to maintain old software of old design specifications like others, for them to migrate to a newer system would be extremely expensive.
All this results in a highly optimized company that can deliver a bid price well below that of their competitors.