It's because of how licensing works and the contract agreements that come with it. It's first come first serve with the highest bidders usually. Getting licensed for an anime means more money for the mangaka and anime companies want to be sure to snag the good series. Thing is this comes with contract agreements where they must release by x-day or lose the license etc. Plus there is the whole, 'make the anime while the manga is hot' ideal rather than wait till people have forgotten about the manga to animate it. After all if there isn't much of a following there isn't much point. You also take into account how long some manga have been running. One Piece for example is still not complete even after nearly 15 years. While even some shorter anime series had manga that was only released on a monthly basis and therefore took several years to make enough manga for a small 12 episode series. They just can't wait around. As a result we often get unfinished or anime-original endings.