I think this is a great question. However, the author didn't even mentioned who and why passed the books to Wang ChongYang. So any answer would be speculations.
Let me made my story. Huang Shang wrote the books and hid them underground of his house. Years later, a wealthy man bought the house and try to dig a basement. The books were found. The wealthy man tried to read but didn't understand it, since the book is based on Taoism. One day, a local Taoist priest visit this wealthy man for charity, and then acquire the book as a donation. Although the priest cannot fully understand the books, he still learnt something and became a mid-level master. The secret of the books were found and other masters (武林高手) started killing each other for the books. Wang ChongYang heard the news and tried to seek for them. When he arrived the battlefield, all the people there are either died or seriously injured. Then, Wang ChongYang got these books and considered them as a curse to the WuLin (武林). However, the other top masters heard the news as well and eager to read the books. They found Wang ChongYang and tried to rob. Wang ChongYang knew that he can't defeat the other masters if they are united together. Then he came up with an idea that holding a contest at Hua moutain (华山) and find out who is the No.1 master (天下第一).
And you've known the story afterwards.
Please let me know if my story is reasonable.