I believe the reason why they ask is so if something happens during a session, such as an injury for example, they cannot be held to blame. Certain medications can increase blood pressure, and if you are doing something that increases blood pressure as well, there could be health risks associated to it. Also, a lot of personal trainers run their own business, and the way they get new business is by results. If you are trying to lose weight, then start taking a medication that has the potential to increase weight (ie estrogen), the trainer may not get the results they were hoping for to further their business, and realistically, would anyone want to start a business activity that they know has no chance of success?