'Level best' started its life as a colloquial/slang expression in America in the middle of the 19th century. I imagine the idea behind it was that this was the highest one's ability could stretch up to, as if on some sort of ability-measuring graph or device.