The maximum allowed in the Bible (Deuteronomy) was 40 lashes; 39 became a standard in Jewish law so as to make sure 40 lashes weren't administered and thus the Law be broken. If I'm not mistaken, it was thought that anything more than about 40 or so might kill someone.
More importantly, Christ was supposedly administered these 39 lashes, creating the cultural idea of "39 lashes" you're thinking about.