op you're thinking like a man. men always think of things in terms of sex. it's not usually about that for women. in order to understand your wife you need to understand that women don't think like that.
first, consider the culture of the office. what kind of field does she work in? if the norm is to dress up in heels, skirts or shirt and tie business attire, then she's just following what everyone else does. if she works at the front desk, maybe they want her to look a certain way for customers and clients.
next, understand that the professional office is another place where women can "Dress up" and play with style and develop their identity. women like to make themselves look like what they see in magazines, on tv, in catalogues. women want to be the pretty, put together, professional women just as much as men want to be and look the part as well. the office isn't any different from going to class looking nice, going to church looking nice, going to the store looking nice. it's mostly about how she views herself.
women dress for other women. they want women to recognize their style and confidence. they want to see other women dressed nicely. if other women are dressed nicely, you don't want to be the girl in khakis and sneakers.remember an office is much like a high school. there are social hierarchies, there are places you can't go and ceilings you can't break unless you're dressed a certain way. you're not getting any kind of respect in an office in you dress poorly. this goes for men too.
were the heels stripper heels or were they stiletto? does she know how to dress up in an office appropriate way? is she acting differently otherwise? she may be copying the style of other women she sees in the office in order to fit in more. again some women don't do well being the oddball out or the office pariah, and yes that can happen with clothing. if her clothing isn't really the right style, she may be trying to use what she has with limited options. you can always tell when someone is trying to be office professional, but they don't have the money or they don't own anything else. the inappropriate shoes comes into play here. if that's the case, let her get some thicker, lower heeled shoes, longer skirts. compromise on dress pants and heels if you hate skirts.