You should look up the history of it being made, in a way explains how it turned out as it did.
The movie was suppose to be a raging satire ridiculing a popular "action script writer" at the time and through a number of twists and turns "that guy" actually ended up working on the script! Can't make this up. There was also some time constraints due to a writers strike, studio head meddling and holidays I think.
Last Action Hero was an original screenplay by Zak Penn and Adam Leff, meant to parody typical action-film screenplays of writers such as Shane Black. Penn noted himself that the studio ironically then had Black rewrite the script. The original screenplay differs heavily from the finished film and is widely available to read online. Although it was still a parody of Hollywood action films, it was set almost entirely in the film world and focused largely on the futile cycle of violence displayed by the hero and the effect it had on people around him. Due to the radical changes, Penn and Leff were eventually credited with the story of the film, but not the screenplay, which is unusual for a film based on an original screenplay. Several script doctors did uncredited work on the script, including Carrie Fisher, Larry Ferguson, and William Goldman. Penn and Leff disliked various parts of the final film, including the idea of a magic golden ticket. In their draft, the story would not explain how Danny got transported into the film world.