Agency costs arise from conflicts of interest between principals, such as shareholders, and agents, like company executives, leading to inefficiencies in resource allocation. These costs can include monitoring expenses, bonding costs, and residual loss, all of which can impact a firm's profitability and governance structure.