そんなことをした

did such a thing

→ そんな
phrase Uncommon #19,920
did such a thing そんなこと means “such a thing,” and した is the past form of する (“to do”).
JA: 彼はそんなことをしたことを後悔している。
EN: He regrets doing such a thing.

そんなことをしたってもう無駄だ

There's no point doing that now.

— 風の谷のナウシカ (1984)

バジュランギはなぜそんなことをしたのだろう?

Why did Bajrangi do such a thing?

— バジュランギおじさんと、小さな迷子 (2015)

私はなぜトムがそんなことをしたのか知っていた。

I knew why Tom had done that.

何で彼女はそんなことをしたのか。

Why did she do such a thing?

どうして彼がそんなことをしたのか理解できない。

I can't understand why he did such a thing.

トムとメアリーはなぜあなたがそんなことをしたのかを知っています。

Tom and Mary know why you did that.

なぜそんなことをしたの?

Why did you do that?

そんなことをしたのは残念である。

It’s regrettable that you did such a thing.

私は彼女がそんなことをしたので驚いている。

I'm surprised that she did such a thing.