As far as I know, married women have to cover their head for tzniut (modesty). A common way to do this is by wearing a wig. But sometimes the wig looks even prettier than the women's hair. Wouldn't this be more provocative?
Other answers have done well to reference the letter and the spirit of the law. A wig, even a beautiful one, covers both bases.
The gemara in Kesubos 72a-b lays out the obligation of a married Israelite woman covering her hair as two-fold: Biblical (deoraysa), and as a matter of Jewish practice (das yehudis). This is a harmonization of two Tannatic sources, namely the Mishna in Ketubos under discussion , in which it is purely a matter of Jewish practice, and Tanna deVei Rabbi Yishmael, where the implication is that it is Biblical.
For matters Biblical, one does not, as a practical matter of applying the law, deduce reasons. One does not look to the spirit of the law, but applies the letter of the law. This is the dispute of whether darshinan taama dekra (whether we deduce the purpose of the law), where the halachic conclusion is that we do not. I've heard explanations for this, including that one's suggested or understood reason might well not be the correct, or the only, reason for the Biblical law.
Within that gemara in Kesubos, the Biblical obligations are less than the 'Jewish practice' obligations. Thus, a kalta (Rashi: a sort of basket-hat), while sufficient Biblically in certain locations, does not fulfill the 'Jewish practice' obligation.
I would suggest that, rather than 'Jewish practice' being a matter of increased chumra (stringency), this instead means that a kalta would fulfill the strict letter of the law. Her hair is, after all, covered, and so she has fulfilled the Biblical mandate. However, as a matter of common propriety, of the common practice of Jewish women covering their hair, a kalta did not suffice. This could be read as a matter of fulfilling the spirit of the law, whatever we define that "spirit" as.
Nowadays, the wig is considered, in certain religious communities, as the common practice for Jewish women covering their hair. I would say that it is das yehudis. Further, das yehudis, not being Biblical and objective, shifts with time, place, and community, along with other subjective aspects of tznius. (For example, whether one must cover her feet is halachically a subjective matter, which halachically depends on one's community.)
I'll add three points in closing.
1) The Bavli discusses kalta (the basket-hat), with a statement by Rabbi Yochanan. אמר רבי אסי אמר ר' יוחנן קלתה אין בה משום פרוע ראש. Rabbi Assi cited Rabbi Yochanan: A kalta lacks any problem of uncovered head. The Bavli then distinguishes between Biblical and Das Yehudis, between private domain, courtyard, alleyway, and marketplace.
The Yerushalmi(Yerushalmi Kesubos 42b) has a parallel statement, and distinguishes between locale, but never makes the harmonization between Mishna and Tana deVei Rabbi Yishmael to bring in a Biblical aspect. But that Yerushalmi has a statement by Rabbi Yochanan: רבי חייה בשם רבי יוחנן היוצאה בקפלטין שלה אין בה משום ראשה פרוע Rabbi Chiya citing Rabbi Yochanan said: One [a woman] who goes out with her kapilitin, there is not in it an issue of uncovered head.
The word kapilitin is actually Latin. It is a cappilitium, which is a wig.
So a wig is placed in the same approximate place as a Babylonian kalta.
I would say that a similar sentiment as those who, throughout the ages, have wanted to ban wigs, is motivating Rabbi Yochanan's statement. Despite "looking like her hair", besides being hair, besides "making her look more attractive", it fulfills the obligation.
And this furthermore places the wig explicitly within the realm of das Yehudis, which I would say is subjective and dependent upon common Jewish women's practice.
2) The spirit of the law, that is, the motivating principle, is not necessarily what some people assume. It is not necessarily that hair is so beautiful and provocative that it is akin to, and must be treated as nakedness and pornographic (erva). And that fake hair, if beautiful and attractive, is more so, and would have the same status.
I had a discussion online with someone who made a statement along these lines, of assuming reasons and therefore application: "of course, no one would say that a woman could put her own hair on her head as a wig. So why would you say that she could take another woman's hair and put it on her head." I pointed out that the Mishna Brurah explicitly says that a woman can use her own disconnected hair as a wig. (And there are associated reasons why it is different than her connected hair.) My point: don't assume your own reason as an absolute known entity.
3) Throughout generations (rishonim, acharonim, I would say even possibly Amoraim), there have been disputes as to the status of the wig, with some arguing that X defeats the purpose and others arguing that it is fine. That is, this is not a new dispute and a newly discovered argument. I am writing this because some try to argue that innovations in sheitel making makes modern wigs a different animal than the wigs of prior generations. However, this is not the case. Back when Rav Moshe Feinstein permitted wigs (see Igros Moshe, Even haEzer chelek 2, siman 12), he explicitly addressed (as a matter of maris ayin) a wig which is indistinguishable from a woman's natural hair, where it seems she is not wearing a wig. And Rav Shalom Shwadron, in 1972 or earlier, complained of realistic looking wigs, such that the woman didn't look married. This is not exactly the same argument as "looks prettier", but that is just the latest spin to try to make this in to a new issue, different than the ones discussed by Rabbis through the ages.
A lot of people would agree with you and say that a wig is less modest since it makes a lot of women look prettier.
But to understand the other side, one of the ideas behind wearing a wig is that it does cover the woman's real hair which has some spirituality to it that a wig does not have, since the wig is not the women's actual hair. A wig actually does a better job of covering all of the woman's real hair than other forms of head-covering which is why in certain circles women only wear wigs.
Also, according to the exact letter of the law, all you have to do is cover your hair and it doesn't matter with what. Therefore a wig is fine, whether or not wearing a wig goes against the "spirit" of the law.
It seems to me that much of the idea of tznius is from the perspective of the women, and it is a mistake to think of tznius as protecting men from improper thoughts. Therefore, the primary reason for covering hair is that a women should not display her own hair in public, keeping her beauty for her husband. A wig will answer for this, even if it is prettier than her hair.
There is also clearly a more general consideration of not acting in a way which increase the risk of prohibited affairs. A pretty wig obviously goes against this, but there is also no specific rules here, and hair coverings are not, to my understanding, directly related to this issue.
(I could not find any sources for this idea.)
Although one of the answers above touches upon my following response to the question, I feel it is necessary to emphasize it more clearly and spell out the common misperceptions that lead to the question in the first place. This will yield a more satisfying and definitive answer
- It is not prohibited for a woman to appear attractive in public. If it were, then surely our women would be wearing full chadors, like the Moslems, Lehavdil
- It is not even prohibited for a man to objectively note that a married woman is attractive. Otherwise, why would we sing "Kallah No'uh Vachasudo" at a wedding?
- It is not even necessary for a frum woman to be concerned about how an irreligious man looks at her, as long as she has done her part to comply with the Halachos of Tznius. After all, some men might find any aspect of a woman's appearance attractive. To prevent such contingencies, we should again consider the chador!
- Halacha tells us that even looking at an unmarried woman's little finger in a lustful way is prohibited. Yet, an unmarried woman's hair is deliberately NOT covered, which indicates that hair, in and of itself, is not the problem.
As much as I respect the opinion that Mitzvos do not need and should therefore not be ascribed subjective reasons, I apologize for doing so here as it is of paramount importance to settle this question in the "Olam's" mind. To do so, I am compelled to say that the primary reason (besides the mystical ones) for a woman to cover her hair is to advertise to and remind any man that cares to know and cares about Halacha, that she is married and should not be considered a prospect. Period. Therefore, it makes eminent sense that she should wear a covering that any Frum man, familiar with the conventions of local hair fashion, could discern and take heed, from a mile away!
I know I can tell MOST sheitelech from real hair (when I put my glasses on) at almost that distance!
So, the issue is NOT whether she looks more or less attractive. The issue is whether a woman's head covering conveys the message sufficiently.