The 2nd biggest flaw in The Force Awakens is the precept that there would be a "map to Skywalker." Such a thing is absurd. You don't have a map to a person, you have a map to a location. This could have been easily fixed by changing the focus of the movie from the quest for Luke to the quest for the lost Jedi temple. Then the answer to your question becomes more tangible.
Maybe it's been a long time since the Jedi temple's location was known by anyone outside of the Jedi order (if ever). If the Empire spent time looking for it, then it would make sense that they had incomplete information, and that the rest of the information could be discovered, found, and/or given to someone by Luke. (Again, can we think of any possible explanation for the imperial archives having any information about Luke's whereabouts 30 years after the end of the Empire? No. It makes no sense.)
The real problem with Lor San Tekka is that we know almost nothing about him. We do know that he knew Leia and Ben Solo, and he considered her royalty, which means he was probably from Alderaan and a friend of Baal Organa. As such, chances are he knew Luke, and there is a chance Luke secured some of his knowledge about the Jedi Temple's location with this trusted ally. But, getting back to your question, why would Luke give that information to someone and then go there to hide out? The only answer I can think of is that they're not connected. He gave the information about the Jedi temple's location to Tekka at some earlier time (during the 30 year gap) for some other reason. Then, after the fiasco with Ben Solo, he decided to go hide in the most unfindable place in the galaxy--without thinking that anyone else would be able to find it.
Of course, this raises other questions. How does anyone know that Luke went to the lost Jedi temple? Why did they even need a full navigational chart? (If they had the last piece then they had the planet's coordinates, so why not just go there?) How did they know what part of the planet to go to? (Planet's are huge!) Etc. Etc.