Could this possible be a fetish? I don't think eating a lot of corn starch would cause too many problems health-wise, could be wrong though. I don't know why this is happening specifically, but I learned an interesting behavioural psychology answer to why people develop fetishes if you are interested, and you can decide if this applies to your life.
Essentially, you associated sexual feelings in some way with eating corn starch/the taste/the texture of corn starch. It's possible that you once ate corn starch while you were sexually aroused and then cornstarch became a classically conditioned stimulus eliciting sexual arousal once you ingest it.
Classical conditioning is training someone or something to associate a novel stimulus (i.e., corn starch) with an unconditioned stimulus (i.e., sexual arousal) or to the unconditioned response resulting from the unconditioned stimulus (i.e., sexual euphoria). Whether or not the novel stimulus is associated to the euphoria or sexual arousal itself is entirely dependent, and whichever it is associated with will determine the best way to eliminate the behaviour (there are kind of two theories regarding classical conditioning, both seem applicable but it can be narrowed down by a professional; there is S-S theory where the two stimuli are associated, and S-R theory, where the novel stimulus and the response are associated; both have different implications for effective treatment).
What ends up happening is the stimuli and this response are paired a few times (or sometimes only once) and an association is generally made between the novel stimulus and the unconditioned response (generally, but as previously stated, could be between the novel stimulus and unconditioned stimulus).
This is a very elementary, but satisfactory, answer to your question of how this can keep happening. You have this once novel stimulus becoming a cue for your body to act in funny ways because you have unknowingly trained yourself to do so. What often happens with classically conditioned responses, is we operantly condition ourselves to seek them out; operant behaviours can use classically conditioned responses, and operant behaviour in general is sought out by the individual because of pleasant results; operant behaviour is strengthened by its consequences, therefore, you keep eating corn starch. Is it possible that you have been in the kitchen/alone/whatever else kind of discriminatory situation/stimulus you've been around, and thought "man, I could use some corn starch rate now", then you eat some, feel sexual gratification, and so on? Does this sound familiar at all?
Alternatively, maybe you are/were craving carbohydrates (seeing how corn starch is a carb)? Maybe the situation above happened while this was taking place. Because you were craving carbohydrates (which release a lot of feel-good neurotransmitters when ingested) you interpreted that as sexual arousal? And now this became classically conditioned? Hard to say... I am not a registered psychologist by any means. But how it developed doesn't matter so much as dealing with it does, if it bothers you.
If this is a real issue for you, say you can't go a few hours or a day without eating cornstarch, you should consult a behavioural psychologist/psychiatrist and they'll be able to help you not only identify how to eliminate this behaviour but maybe even how it developed (find someone who specialized in cognitive behavioural therapy, or behavioural therapy). Understand that fetishes really aren't all that unnatural (tons of people develop them, especially during puberty when hormones are flying left and right). Generally, fetishes are simply maladaptive and are only 'bad' when they involve socially unacceptable acts, such as murder. I probably would get it dealt with if it has been bugging you or costing you a lot of money or you are feeling sick by the amount you are ingesting. Good luck and hopefully I answered your question =) *keep in mind that this is just my speculation from my own knowledge and could be totally wrong. NOT a professional.