Ceiling joist don't always tie the rafters together, particularly where the roof slopes in two directions,
And what holds them up when the supporting wall is removed?
What you have called a ceiling joist indicated in the pic in your post is a hanging beam not a ceiling joist, it supports...