No one had to do anything. This was animated for a partial/ulterior plot of this episode/saga. A scene of a television animation was, is, and always will be, a creative idea born of dozens of people in a studio who have worked their way to where they are now competently. The very reason entertainment exists is for that end, entertainment, what better justification is there? Fandiscs, eroges and erotic OVAs have been produced and distributed since the 80s, with OVAs themselves dating back to even the 70s; they've always been around, and if you stick your nose around, you're bound to find particular places where the more 'private/personal' styles of animation and story become mixed with high-end studio production values and writing. The Fate series itself began as eroge over ten years ago, and has since evolved into a huge franchise that has enough of a fanbase to rival modern day Dragonball fans.