When to buy those items is very situational:
Assuming generic AD carrys like Graves, Sivir, Miss Fortune or Ashe, the first time you go back to base you should buy 1-2 Dorans Blades and a few Healing Potions instead. Those items help you stay in lane longer with their health, lifesteal and damage bonus, which allows you to farm more gold before going back the next time. They are what empowers you to actually get that B.F. Sword.
Don't buy Berzerker Greaves first because they don't actually help at all. You won't be attacking constantly but in bursts instead, so the Dorans Blade that you should buy instead actually has a bigger effect on trades.
If you can stay in lane long enough because the opponent doesn't harass or is completely outclassed, you can get the B.F. Sword immediately, but that rarely happens in a normal game. You need the small edge that Dorans Blades give. If you come back to lane without a Dorans Blade and your opponent has two of them, he can completely bully you around and free farm on a frozen lane while you sit under tower, not getting any farm or experience.
Also, if you can't afford the biggest component, for example for the Infinity Edge, you can get a smaller component like the Pickaxe first (after Dorans Blades), which still builds into the same item and makes you stronger in lane than if you would wait for the big item.
"Selling items is bad" is mostly true, but:
- If the item you are buying now is helping you to stay in lane longer (i.e. Dorans Blade/Dorans Ring) then it is worth it because by staying in lane longer, you gain more gold than you lose from selling it.
- If you come back to base lacking 200 Gold for your next major item (Infinity Edge, Bloodthirster, Phantom Dancer), going back into the fight without it would make you weaker now and potentially put you further behind than selling one of the Dorans Blades and getting the big item now.
It's all about short term benefits giving you an edge to have a bigger advantage later.
All of this is true in the same way for AP carrys with Dorans Rings.