Why can't anime studios create animes for foreigns audiences? For example, to originally script dialogues in English and set the story in a country of any and the characters are non-Japanese.

If anime became world-renowned, why can't animation studios bother to create animes that target foreign audiences rather than its own Japanese audiences?

For example, the video game Resident Evil is produced by Capcom, a Japanese video game developer, but the game was created for American audiences because originally the English acting was recorded. Also, Afro Samurai which was animated by Gonzo was an anime that originally recorded English voice acting, so I would presume that anime was catered to American audiences.

So I find it strange why Japanese animation studios can't even produce animes to target non-Japanese audiences.
I'd say that it's not that they can't, but rather that there simply isn't much incentive for them to do so. It just doesn't make much business or financial sense to target a foreign audience, not when a Japanese audience is much closer, more familiar, and less costly to target.

To target foreign audiences, I would imagine that an animation studio would need to expend a lot of additional time and effort on things like dealing with overseas licensors, TV networks, distributors, as well as having to handle language barriers and translations (since I'd imagine that most people working in a Japanese animation studio wouldn't be fluent in English). Even for typical anime, studios tend to avoid hiring native speakers of foreign languages if they need a voice for a character with a foreign language, because it's generally much cheaper to hire someone born in Japan. So, if even one foreign voice actor is too costly, then the entire production being in a foreign language would be out of the question.

Okay, but what if we just let the studio produce everything in Japanese, a language that the staff are all familiar with, and then let another company handle the translations for the foreign audience? Well, if the original language is in Japanese, they might as well just target it to Japan in the first place! The localization is probably best left to companies in the target country who natively know the language anyway (or else we might get something like the Engrish in the Psycho Pass Movie). Also, as Memor-X points out, Japanese studios for the most part have little control over which English actors are used and how the English localization and distribution are done.

That's not to say that anime targeted at foreign audiences have never happened. The barrier is just higher. As you and Memor-X mention, Afro Samurai was a production that happened thanks to Samuel L. Jackson's interest and contribution. Gagantous also points out that Netflix has financed a number of original anime series that seem to be animated by Japanese studios, and like with other Netflix original series, are released worldwide all at once.

So, as these examples have shown, Japanese animation studios are capable of creating anime for foreign audiences. It's just that in most non-exceptional cases, they wouldn't have much reason to do so.

Note that if the incentive is there (e.g. either personal interest or with investment from a foreign party, like with Samuel L. Jackson and Samurai Afro), it is doable. After all, if there's a foreign producer already in the loop, then the entrance barrier is much lower.

While Japanese anime studios haven't really created any foreign-targeted anime on their own, they have however been involved in a number of foreign animation productions. So in a way, I suppose you could say that Japanese animation studios have (co-)created a number of anime (for some definition of anime) for foreign audiences. For example:


Batman: The Animated Series was produced by Warner Bros. Animation, but animated by various overseas animation studios, including the Japanese studios Spectrum Animation, Sunrise, Studio Junio, and TMS Entertainment (as well as various other studios from South Korea, Hong Kong, Spain, and Canada).
The Animatrix, a compilation of nine animated short films based on The Matrix trilogy, was produced by the Wachowskis, but a large number of the films were animated by Studio 4°C and Madhouse from Japan.
Transformers Animated (I watched this series growing up!) was produced by Cartoon Network Studios, but animated by the Japanese studios MOOK DLE, The Answer Studio, and Studio 4°C.
Legend of Korra had some parts of it animated by Studio Pierrot from Japan (as well as Studio Mir from Korea).
Miraculous Ladybug is produced by French studios Zagtoon and Method Animation, in collaboration with De Agostini Editore from Italy, Toei Animation from Japan, and SAMG Animation from South Korea. Actually, it was originally going to be a 2D anime-style series (see this trailer for a taste of what could have been), but for design reasons, they switched to 3D CGI animation later on.
Also, Toei Animation has actually been commissioned to provide animation for lots of American studios in the past.


As a final side note, I'd like to add that there is precedent in other media  where the producers mainly target domestic audiences over local audiences when there's money to be had. For example, Hollywood and China.