Thanks to both of you for your answer. I thought that a very small amount of the secondary carbocation remains in the solution long enough to react with the nucleophile. So that it will form a secondary product. Because the reaction follows the Markovnikov's rule, and in agreement with this rule the main product is formed, but I must also consider the addition of the electrophile to the less hydrogenated carbon, which leads to the formation of a secondary carbocation (I wouldn’t have considered this if it had formed a primary carbocation because the latter is too unstable).