"...but I wanted to post a longer answer that goes a little deeper for those of tu who are interested. I'm trying to be very careful about marking spoilers, so hopefully all this works."
"The third book explores how the society came to be and features an ending that fans have already heard will be shocking. But as Veronica Roth told Here & Now’s Robin Young, she had the ending planned from the very first book."