The secondary market is where investors can trade loans (or any other investment) that they already own. The main purpose is to liquidate loans that you already own before they are due. On some market places you may pay some fees for trading these loans.
However, if a platform wants to offer comprehensive auto-invest features, it usually needs to establish a secondary-market first. The trading algorithms of the platforms then calculate the optimum between sellers offer and buyers demand for trading loans on the secondary market.