If you buy a motorcycle which is still subject to hire purchase or conditional sale agreements, then it belongs to the finance company until they have been paid off and the company is entitled to take it back.
If you were not aware of the outstanding agreement and bought the motorcycle in good faith you can sue the seller, if you can find them. You may also be able to keep the bike but this is not the case if the bike was stolen.