Quasi-contractual obligations arise not from agreement but from the principle of preventing unjust enrichment. When one person benefits at another's expense without a legal basis, the law imposes an obligation to restore that benefit. This is based on equity and good conscience, not actual consent between parties.