This question is interesting because of the moral subtext to a legal issue. The question how these things can go together is of the same type as "Why do we criminalize murder, but train our soldiers to kill?". So, before I get down to the specifics, I want to quickly cover the relationship between morals and law (oh boy, I sense this is going to be a long post...).
Law and morals
Generally, you should nor confuse, neither mix law and morals. Law by itself is amoral and a ruling by a court of justice carries no moral accusation of any kind. So when you say "prostitution is legal", this carries no moral judgement in the sense that prostitution is moral or immoral. It just states that it is legal (or not illegal), not more and not less.
That does not mean that morals don't influence the law. They do, but usually not in a direct sense. For once, the decision whether to legalize an issue is often dictated by morality. Prostitution is a good example: forbidding prostitution that does not involve violence, coercion, deceit or any other infringement of sexual self-determination, physical integrity or the protection of minors and other defenseless persons is only motivated by the moral judgement of a society. So while the law carries no moral judgement, its motivation is mainly moral.
There is also sometimes a moral corrective embedded in the law and in this case, such a regulation is important for the understanding of the case (see below). However such moral influences have to be handled restrictively, since they are an intrusion to the amorality of the law.
Legality of prostitution
There are two aspects to the legality of prostitution: the criminal aspect and the civil aspect. These aspects have to be kept strictly separate.
Criminal Law
The "regular" act of prostitution is not a criminal offense since a long time in Germany. So, there was actually no recent legalization of prostitution in Criminal Law. There are (of course) laws that make some forms of prostitution illegal (no children and adolscents as sex workers, no force, no rape etc.), which you can find in the thirteenth section of the German Criminal Code (§§ 174 ff. StGB), that contains the relevant laws that protect sexual self-determination (not only of prostitutes).
Civil Law
The civil law aspect is more complicated - and far more interesting - and it is about what the question refers to as "legalization" of prostitution. Here is where morals comes into play again. The reason is that there is (and there was) no specific regulation that makes prostitution illegal in German civil law. There is however § 138 BGB (German Civil Code), that basically makes contracts illegal that are "gegen die guten Sitten" (which roughly translates to "on the grounds of immorality"). What this regulation says is that immoral contracts are not forbidden, but "outside the law". That means you can not sue anyone for non-compliance with the contract, but once the contract is fulfilled, you can also not sue for restitution on the grounds of immorality.
For a long time the courts ruled prostitution as immoral in the sense of § 138 BGB which meant that a prostitute could not sue her clients for compensation and the client could not sue for returning the payment. That's where the custom comes from to always ask for the money before the sexual act begins.
In practice, these court rulings meant that the sex worker was basically powerless, while her clients had nothing to fear. That made her not only a social, but also a legal pariah, while her clients could openly admit to have been using the services of a prostitute without the same social implications. Considering this massive power imbalance and the general change of the moral views by society (which are also motivated by the situation sex workers where in), the courts changed their opinion on prostitution and § 138 BGB and, suddenly, prostitution was legal the eyes of German civil law.
The process of "legalization" by passing laws about prostitution was only a reaction to this change of court opinions. So prostitution was technically not legalized, but in a typical German effort to not keep this aspect of life unregulated, laws were passed to regulate issues like health and hygiene, labor aspects etc.
Answers to your questions
The questions you have asked have aspects of the aforementioned § 138 BGB, but they also have aspects of labor law, which regulate the special power imbalance between boss and employee.
- could a job opening be for secretary with sporadic sexual services?
Whether this is considered immoral according to § 138 BGB is dependent on the individual case. In a normal job, this would be considered immoral and and an employer would be in trouble. But if she is applying for the job as a prostitute with the additional task of keeping the brothel's records, that could be considered legal. And I find it hard to construct a case where a secretary can be legally employed when she has to provide her boss occasional sexual services.
- could they ask a potential employee to send naked pictures of herself, or even to strip naked at a job interview?
Is she applying as a saleswoman? Absolutely not. Is she applying as a dancer in a strip club? Maybe.
- could a business owner require that all female employees wear revealing attire?
Who? Office employees? Surely not. Lawyers in a law firm? No way. Female construction workers? No chance. Waitresses in a brothel? Probably yes. All female employees irrespective of their position? Probably not.