Why do Agrarian nations EXPORTS their PRODUCE but import same as FINISHED CONSUMABLES??

pexels-julie-aagaard-2294477.jpg
Image Source:Pexels.com:Free Stock:Julie Aargaaard

Ghana Produces Cocoa beans , export them ,but IMPORTS finished Bournvita and other Cocoa confectionaries .

Why??

Nigeria Produces Palm Oil, but IMPORTS processed vegetable Oil.

Why??

Liberia Cut down their Trees, Export the LOGS , but IMPORTS processed WOODEN FURNITURE.

Why???