Varying sentence structure is important because

an essay written entirely in simple sentences will be more engaging
it confuses the reader and makes them lose interest in your writing
the reader remains interested and writing appears more articulate
using the same sentence types throughout is interesting to the reader

and keeps their attention engaged. Additionally, varying sentence structure adds depth and complexity to the writing, making it more engaging and enjoyable to read. It also allows the writer to convey different thoughts and ideas more effectively and helps avoid repetition, making the writing appear more articulate and polished.