Repurchase Agreement

Ok for some reason I am having a problem understanding what probably is a very simple concept of a repurchase agreement. When the borrower agrees to repurchase the security from the buyer, is the buyer basically short selling this? If he owned a $5 million dollar treasury bond, why would he sell it and pay a interest cost and try to earn a small spread versus just continue to hold it. Please someone help

Wrong Forum…sorry